My question is specific to kubectl and containerD . What is the roles and responsibilities of kubectl installed on each node? What the role of containerD run time interface and who creates the containers on the worker nodes ?
Is it that kubectl sends/interacts with containerD on each node to create containers ? This is my udnerstanding .
Hi @shashikaushal2006123
kubectl is a client to interact with the kube-apiserver — Kubernetes. Cluster administrators use kubectl to interact with the cluster for various operations, like viewing. creating, and deleting resources on the cluster.
Note: Mostly you would not see kubectl installed on all the nodes, instead it’s available only on the management machine or control plane to send commands to the Kubernetes cluster.
The kubelet on each worker node communicates with containerd, a container runtime responsible for managing the lifecycle of containers. Containerd handles the creation, execution, deletion, and management of containers based on instructions from the kubelet, enabling efficient container management without being tightly coupled to a specific runtime.
So, whenever a user requests to create a Pod/Deployment using kubectl, kubelet calls Container Runtime ( contained) in this case, which will carry out all the required operations like pulling the image, etc.
And, there’s a lot more to it.
You can refer to this high-level Kubernetes architecture to understand the interplay.
1 Like
You can set up a Kubernetes cluster without installing kubectl on the server. Just use kubeadm to initialize the cluster, then copy the .kube/config file to your local machine and manage the cluster with kubectl. Alternatively, you can use tools like k9s or OpenLens as a replacement for kubectl if you prefer a different interface.