I have been training some people on Kubernetes and have received few questions from some attendees. Personally I have ignored these things as K8s is managing all this. Here are the questions:
- Where does the code for services like ClusterIP/NodePort runs? Is it on the worker node/master node?
- As per Kubernetes Docs, when you provision a LoadBalancer service, corresponding NodePort service and ClusterIP services are automatically created for you. Surprisingly I am not seeing that happening. I am provisioning a public LoadBalancer on Azure and when I describe this LoadBalancer service using kubectl describe command, I do not see NodePort getting assigned an IP. Its written in the output. Only EndPoint IPs are given. So where exactly is the mapping between LoadBalancer and NodePort services for all the worker nodes?
Kubernetes version: 1.20.9
Cloud being used: (put bare-metal if not on a public cloud) Azure
Installation method: Azure Kubernetes Cluster using Azure CLI
Host OS: Ubuntu 18.04
CNI and version: Azure CNI v1.4.14
CRI and version: containerd v1.4.9+azure