How Does a Kubernetes Pod Get Created? Step‑by‑Step Walkthrough
This article walks through the complete Kubernetes pod creation workflow, from submitting the YAML with kubectl to the API server, storing the definition in etcd, scheduling, kubelet orchestration, container runtime delegation, CNI networking, health probing, and endpoint setup for services.
Pod creation process in Kubernetes
1. kubectl sends the YAML manifest to the API server.
2. The Pod definition is stored in etcd.
3. The scheduler assigns the Pod to a node (the manifest remains in etcd; the node does not yet have the Pod).
4. kubelet on the selected node begins creating the Pod.
5. kubelet delegates container creation to the Container Runtime Interface (CRI).
6. kubelet connects the newly created container to the CNI network.
7. CNI assigns an IP address to the container.
8. Health probes run; kubelet reports the Pod IP back to the control plane.
At this point the Pod is fully created. If the Pod is part of a Service, Kubernetes also creates an endpoint object that links the Pod’s IP and targetPort.
The endpoint is used by:
kube-proxy to set iptables rules
CoreDNS to update DNS entries
Ingress controllers to configure downstream services
Service meshes
Other operators
Deleting a Pod follows the same steps in reverse order.
Efficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.