What is a reconciliation loop?
A controller repeatedly compares desired state (what you declared) with observed state (what exists) and acts to close the gap. If a pod dies, the loop notices the count is below the desired replicas and creates another. This is why Kubernetes self-heals without anyone running a command.
Answered in
What Really Happens After kubectl applyFollow one Deployment from kubectl apply to a running pod: API server, etcd, controllers, scheduler and kubelet each own one step of the chain.
Read the full analysisOther questions this article answers
More system design & architecture questions
- What is a Backend for Frontend?
- What is the main risk of the BFF pattern?
- What is a value-added service layer?
- What does a field mask do in an API?
- What is a cold cache problem?
- How does change data capture keep a cache correct?
- Why use add instead of set when warming a cache?
- Why partition the cache differently from the database?
Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design & Architecture beat.