# DNS resolution in AWX with minikube

**URL:** <https://forum.ansible.com/t/dns-resolution-in-awx-with-minikube/36377>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [February 28, 2022, 10:13am UTC](https://forum.ansible.com/t/dns-resolution-in-awx-with-minikube/36377 "2022-02-28T10:13:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lejooohn](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@Lejooohn](https://forum.ansible.com/u/Lejooohn)\
**Post date:** [February 28, 2022, 10:13am UTC](https://forum.ansible.com/t/dns-resolution-in-awx-with-minikube/36377/1 "2022-02-28T10:13:55Z")

</div>

Hello there,

I’m experiencing a strange behaviour with AWX and DNS resolution.

I have 3 AWX :

- An old one in 9.0.1 version directly installed on the OS (CentOS 7.7)
- Two recent in 20.0.0 version (integration and production) base on minikube (CentOS 8.5)

I have created a simple playbook that it permit to launch a simple shell command and display the output :

**- name: One shot custom shell command**  
**hosts: “{{ _target_ }}”**  
**become: true**  
**tasks:**  
**- name: Custom shell command**  
**shell: “{{ _custom\_command_ }}”**  
**register: command**

**- debug: msg=“{{ command.stdout }}”**

_Target_ = all  
_custom\_command_ = cat /etc/redhat-release

I ran this job from my different AWX instances and here is the result :

AWX 9.0.1 = all hosts (24) well responding and the output is displayed like expexted  
AWX 20.0.0 = hosts are randomly return “Failed to connect to the host via ssh: ssh: Could not resolve hostname myhostname: Name or service not known”. When i say randomly, it’s mean i ran the playbook 3 times and its not the same hostnames that AWX return this message for.

So i decided to look into my resolv.conf (On the OS) and here is the content :

**options timeout:1 attempts:2**  
**search [test.fr](http://test.fr)**  
**nameserver 10.1.2.3**  
**nameserver 10.1.2.4**  
**nameserver 10.1.2.5**

I have tried all FQDN which failed during the template execution and they all working well.

So, i decided to check the resolv.conf into the container :

**kubectl exec -it production-5f9dcf8dc5-fhm5d -c production-task – /bin/bash**  
**bash-5.1$ cat /etc/resolv.conf**  
**nameserver 10.96.0.10**  
**search production.svc.cluster.local svc.cluster.local cluster.local [test.fr](http://test.fr)**  
**options ndots:5**

The 10.96.0.10 IP correspond to the “ClusterIP” for kube-dns but i don’t see my DNS resolvers IPs in it. In contrast, i correctly have the search “[test.fr](http://test.fr)”.

For information, no issue detected on my DNS servers side.

Anydone does experienced this behaviour and have a clue to help me to resolve?

Regards,

John

---

<div class="post-metadata">

**Author:** ![Lejooohn](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@Lejooohn](https://forum.ansible.com/u/Lejooohn)\
**Post date:** [March 7, 2022, 1:40pm UTC](https://forum.ansible.com/t/dns-resolution-in-awx-with-minikube/36377/2 "2022-03-07T13:40:59Z")

</div>

Hi,

No one are facing this issue? ☹

I’m still trying to find why this behaviour happen but for now i’m out of ideas.
