Running the Kubernetes dashboard

In this section, we'll do a walk-through to access the recently installed Kubernetes dashboard. 

  1. First, check if the internal DNS server is accessible and resolves the hostname IP address:
$ kubectl exec -it busybox -- cat /etc/resolv.conf

nameserver 10.96.0.10
search default.svc.cluster.local svc.cluster.local cluster.local servicemesh.local
options ndots:5
  1. Check the internal service name resolution:
$ kubectl exec -it busybox -- nslookup kube-dns.kube-system.svc.cluster.local
Server: 10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name: kube-dns.kube-system.svc.cluster.local
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

$ kubectl exec -it busybox -- nslookup hostnames.default.svc.cluster.local
Server: 10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name: hostnames.default.svc.cluster.local
Address 1: 10.98.229.90 hostnames.default.svc.cluster.local
  1. Edit the VM's /etc/resolv.conf file to add the Kubernetes DNS server:
$ sudo vi /etc/resolv.conf
  1. Add the following two lines for name resolution of the Kubernetes services and the save file:
search cluster.local
nameserver 10.96.0.10

Next, let's see how we can gain access to our Kubernetes environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.227.194