How kubectl apply Works: A Step-by-Step Look Inside Kubernetes

Running kubectl apply triggers a multi-stage workflow within a Kubernetes cluster, far more complex than it appears on the surface. The API Server first authenticates and validates the submitted YAML manifest, then stores the desired resource state in ETCD, the cluster's central data store. The Controller Manager continuously monitors ETCD for differences between desired and actual state, automatically creating a ReplicaSet and the required Pods when a Deployment is submitted. The Scheduler then assigns each pending Pod to the most suitable worker node by filtering out ineligible nodes and scoring the remaining candidates. Finally, the Kubelet on the selected node picks up the assignment and works with the container runtime to launch the actual container.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in