From 992e82fc1dbcca989f171b7679cee96a924259de Mon Sep 17 00:00:00 2001 From: Drew Walters Date: Mon, 25 Nov 2019 12:15:54 -0600 Subject: [PATCH] tools: Sort resolv.conf minikube K8s script The way that the minikube K8s script orders a host's resolv.conf file leaves service endpoints inaccessible from the host itself even though they are accessible within the cluster, leaving the OpenStack client unusable from the minikube node. This change resolves the service access issues by reordering the DNS entries in the host's resolv.conf file. Change-Id: I58bf6d541e59f3049a0e350291e07241f6a6b544 Signed-off-by: Drew Walters --- tools/deployment/common/005-deploy-k8s.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/deployment/common/005-deploy-k8s.sh b/tools/deployment/common/005-deploy-k8s.sh index 5432573064..45e37880f3 100755 --- a/tools/deployment/common/005-deploy-k8s.sh +++ b/tools/deployment/common/005-deploy-k8s.sh @@ -38,7 +38,6 @@ function configure_resolvconf { # minikube start command, regardless of being passed in here sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf - sudo bash -c "echo 'search svc.cluster.local cluster.local' >> /etc/resolv.conf" sudo bash -c "echo 'nameserver 10.96.0.10' >> /etc/resolv.conf" # NOTE(drewwalters96): Use the Google DNS servers to prevent local addresses in @@ -53,7 +52,9 @@ function configure_resolvconf { done fi + sudo bash -c "echo 'search svc.cluster.local cluster.local' >> /etc/resolv.conf" sudo bash -c "echo 'options ndots:5 timeout:1 attempts:1' >> /etc/resolv.conf" + sudo rm /etc/resolv.conf.backup }