๐จ kubectl Command: Behind the scenes!
When you perform kubectl apply, Kubernetes executes a series of steps to manage the desired state of the resources defined in the provided configuration files. Hereโs on what happens:
1๏ธโฃ. User issues the kubectl apply -f request.
2๏ธโฃ. The kubectl tool sends an API request to the Kubernetes API server to create or update the resource.
3๏ธโฃ. The server validates the userโs request. If all looks good, the server will write the new or modified resource into etcd.
4๏ธโฃ. The kube-controller-manager is a daemon that continually watches the kube-apiserver.
5๏ธโฃ. It will be notified of the new deployment and proceeds to create new pods to achieve the desired state through another call to the kube-apiserver.
6๏ธโฃ. Then we have kube-scheduler which is responsible for scheduling Kubernetes pods on worker nodes.
7๏ธโฃ. The kube-scheduler is then notified about the new pods that have been created and proceeds to determine which nodes are valid placements for the same. The schedulerโs primary task is to identify the create request and choose the best node for a pod that satisfies the requirements.
8๏ธโฃ. Finally, Kubelet is an agent component that runs on every node in the cluster that gets notified if a pod has been assigned to it. The assigned node then coordinates with the container runtime on the node to start the appropriate containers.
โค๏ธ ๐ ๐จ๐ฅ๐ฅ๐จ๐ฐ @prodevopsguy ๐๐จ๐ซ ๐ฆ๐จ๐ซ๐ ๐ฌ๐ฎ๐๐ก ๐๐จ๐ง๐ญ๐๐ง๐ญ ๐๐ซ๐จ๐ฎ๐ง๐ ๐๐ฅ๐จ๐ฎ๐ & ๐๐๐ฏ๐๐ฉ๐ฌ!!! // ๐๐จ๐ข๐ง ๐๐จ๐ซ ๐๐๐ฏ๐๐ฉ๐ฌ ๐๐๐๐ฌ: @devopsdocs
When you perform kubectl apply, Kubernetes executes a series of steps to manage the desired state of the resources defined in the provided configuration files. Hereโs on what happens:
1๏ธโฃ. User issues the kubectl apply -f request.
2๏ธโฃ. The kubectl tool sends an API request to the Kubernetes API server to create or update the resource.
3๏ธโฃ. The server validates the userโs request. If all looks good, the server will write the new or modified resource into etcd.
4๏ธโฃ. The kube-controller-manager is a daemon that continually watches the kube-apiserver.
5๏ธโฃ. It will be notified of the new deployment and proceeds to create new pods to achieve the desired state through another call to the kube-apiserver.
6๏ธโฃ. Then we have kube-scheduler which is responsible for scheduling Kubernetes pods on worker nodes.
7๏ธโฃ. The kube-scheduler is then notified about the new pods that have been created and proceeds to determine which nodes are valid placements for the same. The schedulerโs primary task is to identify the create request and choose the best node for a pod that satisfies the requirements.
8๏ธโฃ. Finally, Kubelet is an agent component that runs on every node in the cluster that gets notified if a pod has been assigned to it. The assigned node then coordinates with the container runtime on the node to start the appropriate containers.
โค๏ธ ๐ ๐จ๐ฅ๐ฅ๐จ๐ฐ @prodevopsguy ๐๐จ๐ซ ๐ฆ๐จ๐ซ๐ ๐ฌ๐ฎ๐๐ก ๐๐จ๐ง๐ญ๐๐ง๐ญ ๐๐ซ๐จ๐ฎ๐ง๐ ๐๐ฅ๐จ๐ฎ๐ & ๐๐๐ฏ๐๐ฉ๐ฌ!!! // ๐๐จ๐ข๐ง ๐๐จ๐ซ ๐๐๐ฏ๐๐ฉ๐ฌ ๐๐๐๐ฌ: @devopsdocs