Deployment self-healing behavior¶
Deployment self-healing behavior refers to the capability of a Kubernetes Deployment controller to automatically maintain the desired state of an application, primarily by ensuring that the specified number of Pod replicas are running at all times.^[deployment.md]
Core Mechanism¶
When a Deployment is created, it manages a set of replica resources.^[deployment.md] If a Pod is deleted—either manually by a user or due to a failure—the controller detects the discrepancy between the actual state and the desired state and reacts by creating a new Pod to replace the missing one.^[deployment.md]
This is demonstrated when a user deletes a specific Pod; the controller immediately provisions a replacement to satisfy the replica count defined in the Deployment specification.^[deployment.md]
Scope¶
The self-healing behavior specifically applies to the lifecycle of the managed resources, such as Pods, and operates within the namespace where the Deployment is created.^[deployment.md] Deleting the Deployment object itself removes the controller and results in the termination of all associated Pods.^[deployment.md]
Related Concepts¶
- Kubernetes
- Pod
- [[Deployment]]
- ReplicaSet
Sources¶
- deployment.md