What happens when you run `kubectl apply -f deploy.yaml`?
BeginnerScenarioUpgrades, etcd, disaster recovery and incidents
Answer
Situation read → Walk through the flow.
What I'd do →
- kubectl sends the object to the API server after authentication and authorization
- Admission controllers mutate and validate
- The object is persisted in etcd
- Deployment controller creates a ReplicaSet, which creates pods
- Scheduler binds pods, kubelet starts containers via CRI
Why → It is a chain of watch-driven controllers.
Interview tip → Mention the watch mechanism.
More on Upgrades, etcd, disaster recovery and incidents
How do you back up etcd on a self-managed cluster?BeginnerHow do you restore a cluster from an etcd snapshot?Advancedetcd database space exceeded: `mvcc: database space exceeded`. What now?AdvancedWalk through a kubeadm minor version upgrade.AdvancedHow do you find deprecated or removed APIs before an upgrade?IntermediateA cluster upgrade broke an operator because its CRD API version was removed. How do you recover?Advanced