<p>I am attempting to set up a single node Kubernetes cluster for testing on an Ubuntu Server 18.04.2 VM running on my Windows Hyper-V.  I install Docker with the standard <code>apt install docker.io</code> command, and I initialize Kubernetes the cluster with the command <code>kubeadm init --pod-network-cidr=10.244.0.0/16</code>
and then add the Flannel CNI with <code>kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml</code> and then install rabbitmq-ha using its &quot;stable&quot; Helm chart.</p>
<p>If the VM is using the Hyper-V’s “Default Switch”, then everything works as expected.  I also have an “Extra Switch” configured as an “External network” with “Allow management operating system to share this network adapter” checked, pointing to my wireless adapter.  When I am in the office, with the Ubuntu VM set to use this “Extra Switch”, the IP address of my laptop and the Ubuntu VM (eth0) is set to 10.X.X.X, and everything works as expected.</p>
<p>When I am at home, with the Ubuntu VM set to use this same “Extra Switch”, the IP address of my laptop and the Ubuntu VM (eth0) is set to 192.168.X.X, and rabbitmq pod throws errors and continuously restarts, with the logged error message:</p>
<p><code>Failed to get nodes from k8s - {failed_connect,[{to_address,{&quot;kubernetes.default.svc.cluster.local&quot;,443}}, {inet,[inet],nxdomain}]}</code></p>
<p>Doing some google research tells me that the rabbitmq pod cannot resolve the name &quot;kubernetes.default.svc.cluster.local&quot;.</p>
<p>Adding the “apiserver-advertise-address” to kubeadm inti, set to my laptop’s 192.168.X.X IP address, does not make a difference.</p>
<p>I also tried using Weave Works instead of Flannel, and omitting the CIDR in the ‘kubeadm init’ command, but I get the same rabbitmq error at home on &quot;Extra Switch&quot;, while working on the home Default Switch and working on the office network.</p>
<p>So what am I missing?  Is there a Ubuntu network setting I need when running under Hyper-V and an external switch?  Or is there a Kubernetes or Docker configuration setting that I am missing?  Thanks!</p>

Steve
<p>As @Steve solved problem, solution is:</p>
<p>Firstly the newer version of the RabbitMQ Helm chart does not have this problem. But if you want to find workaround the &quot;bad&quot; name resolution, you can add a DNS rewrite rule to the CoreDNS config map, see  <a href="https://stackoverflow.com/q/63895949/11057678">configmap-coredns</a>.</p>
<p>Take a look at  <a href="https://github.com/coredns/coredns/issues/4125" rel="nofollow noreferrer">coredns-issue</a>  for a full description of the problem and how to narrowed it down to the particular DNS name in the chain that needed the &quot;rewrite&quot; rule.</p>
