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

Running kubectl apply triggers a multi-stage workflow inside a Kubernetes cluster, far beyond simply creating a container. 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 compares this desired state against the actual cluster state and reconciles any differences, automatically creating ReplicaSets and Pods as needed. The Scheduler then selects the most suitable worker node for each pending Pod by filtering and scoring available nodes based on resources and constraints. Finally, the Kubelet on the assigned node communicates with the container runtime to pull the image and start the 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