While we execute this command:
kubectl create deployment nginx --image=nginx
We are not just creating a container, we are telling Kubernetes to create a Deployment, which ensures Pods running Nginx exist and stay running. The sequence is:
kubectl does not create Pods directly, It sends a request to the Kubernetes API server (running on the control-plane node).
Then the API server validates the request. Kubernetes creates a Deployment resource in etcd. The Deployment automatically creates a ReplicaSet. The ReplicaSet instructs the scheduler (control plane) to assign the Pod to a worker node.