May 2018
Intermediate to advanced
554 pages
13h 51m
English
Since Kubernetes version 1.3, kube-dns has come with Kubernetes and is enabled by default. To check whether kube-dns is working or not, check the kube-system namespace with the following command:
$ kubectl get deploy kube-dns --namespace=kube-systemNAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGEkube-dns 1 1 1 1 1d
If you are using minikube, type the following command to see the addon's status:
$ minikube addons list |grep kube-dns- kube-dns: enabledIf it shows as disabled, you need to enable it using the following command:
$ minikube addons enable kube-dns
In addition, prepare two namespaces, chap8-domain1 and chap8-domain2, to demonstrate how kube-dns assigns domain names:
$ kubectl create namespace chap8-domain1namespace ...