Kubernetes IP service IP and ports

11/28/2018

I've deployed a hello-world application on my Kubernetes cluster. When I access the app via <cluster ip>:<port> in my browser I get the following webpage: hello-kuleuven app webpage.

I understand that from outside the cluster you have to access the app via the cluster IP and the port specified in the deployment file (which in my case is 30001). From inside the cluster you have to contact the master node with its local IP and another port number, in my case 10.111.152.164:8080.

My question is about the last line of the webpage:

Kubernetes listening in 443 available at tcp://10.96.0.1:443

Since, the service is already accessible from inside and outside the cluster by other ports and IP's, I'm not sure what this does.

-- Charles Van Damme
kubernetes

1 Answer

11/28/2018

The IP 10.96.0.1 is a cluster IP of kube-dns service. You can see it using

kubectl get svc -n kube-apiserver

Kubernetes DNS schedules a DNS Pod and Service on the cluster, and configures the kubelets to tell individual containers to use the DNS Service’s IP to resolve DNS names.

So every pod you deploy uses kube-dns service (ClusterIP 10.96.0.1) to resolve the dns names.

Read more about kube dns at kubernetes official document here

-- Prafull Ladha
Source: StackOverflow