Skip to content

Instantly share code, notes, and snippets.

@matthiasr
Created September 6, 2017 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthiasr/b50bb9fd0146d604bdde01e9de799ce1 to your computer and use it in GitHub Desktop.
Save matthiasr/b50bb9fd0146d604bdde01e9de799ce1 to your computer and use it in GitHub Desktop.
kubernetes /etc/hosts
$ kubectl --namespace mr-test exec -ti hostname-test bash
root@hostname-test:/# cat /etc/hosts
# Kubernetes-managed hosts file.
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
fe00::0 ip6-mcastprefix
fe00::1 ip6-allnodes
fe00::2 ip6-allrouters
10.128.1.142 hostname-test
root@hostname-test:/# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 10.124.0.10
search mr-test.svc.ourcluster.example.net svc.ourcluster.example.net ourcluster.example.net
options ndots:5
@matthiasr
Copy link
Author

Kubernetes 1.6.9, Docker 1.12.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment