Skip to main content

What Happens When You Run kubectl apply ?

Question

An engineer runs kubectl apply -f deployment.yaml to deploy an application with 3 replicas. A few minutes later, only 2 Pods are running, and the third Pod is stuck.

To troubleshoot, trace what happens from the moment the command runs until a container starts.