Most of the time we’re going to be primarily (or only) be interested in our application and the pods related to it, but ofcourse Kubernetes also runs “system pods”, for example kube-dns, kube-scheduler etc.
To get a list of these pods, run the following
kubectl get pods -n kube-system
or for fuller information use
kubectl get pods -n kube-system -o wide
On my system, running k8s via Docker Desktop, I’m seeing coredns, etcd, kube-apiserver, kube-controller-manager, kube-proxy, stage-provisioner and , vpnkit-controller.
Let’s see what these are used for
- coredns – as the name suggests, this provides DNS within the cluster, this enables service discovery and name resolution.
- etcd – this store cluster data such as configuration and resources state, it’s a distributed key-value store.
- kube-apiservice – this handles requests from users and tools such as kubectl.
- kube-controller-manager – this runs controllers that monitor the state of the cluster, including things like replication and endpoints controllers etc.
- kube-proxy – this maintains network rules on nodes, enabling communication between pods and also outside of the cluster.
- stage-provisioner – this handles provisioning of storage, including volumes.
- vpnkit-controller – this is part of Docker Desktop, so likely only seen in this usage. It ensures network traffic is properly routed.
A couple of system level pods not showing on my system are
- kubelet – this runs on each node ensuring the containers are running within the pods.
- metrics-server – this collects and aggregates resource usage, this is used for auto-scaling.