Skip to content

Commit

Permalink
tools: Sort resolv.conf minikube K8s script
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
drewwalters96 committed Nov 25, 2019
1 parent 2a33842 commit 992e82f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/deployment/common/005-deploy-k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit 992e82f

Please sign in to comment.