Skip to content

Commit 1a9eb49

Browse files
committed
feat: add new page for self-healing
fix: remove node controller fix: nit comments fix: modify replica replacement Update content/en/docs/concepts/architecture/self-healing.md Co-authored-by: Tim Bannister <[email protected]> fix: remove extra line
1 parent 02198d8 commit 1a9eb49

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: Kubernetes Self-Healing
3+
content_type: concept
4+
Weight: 50
5+
---
6+
<!-- overview -->
7+
8+
Kubernetes is designed with self-healing capabilities that help maintain the health and availability of workloads.
9+
It automatically replaces failed containers, reschedules workloads when nodes become unavailable, and ensures that the desired state of the system is maintained.
10+
11+
<!-- body -->
12+
13+
## Self-Healing capabilities {#self-healing-capabilities}
14+
15+
- **Container-level restarts:** If a container inside a Pod fails, Kubernetes restarts it based on the [`restartPolicy`](/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy)`.
16+
17+
- **Replica replacement:** If a Pod in a [Deployment](/docs/concepts/workloads/controllers/deployment/) or [StatefulSet](/docs/concepts/workloads/controllers/statefulset/) fails, Kubernetes creates a replacement Pod to maintain the specified number of replicas.
18+
If a Pod fails that is part of a [DaemonSet](/docs/concepts/workloads/controllers/daemonset/) fails, the control plane
19+
creates a replacement Pod to run on the same node.
20+
21+
- **Persistent storage recovery:** If a node is running a Pod with a PersistentVolume (PV) attached, and the node fails, Kubernetes can reattach the volume to a new Pod on a different node.
22+
23+
- **Load balancing for Services:** If a Pod behind a [Service](/docs/concepts/services-networking/service/) fails, Kubernetes automatically removes it from the Service's endpoints to route traffic only to healthy Pods.
24+
25+
Here are some of the key components that provide Kubernetes self-healing:
26+
27+
- **[kubelet](/docs/concepts/architecture/#kubelet):** Ensures that containers are running, and restarts those that fail.
28+
29+
- **ReplicaSet, StatefulSet and DaemonSet controller:** Maintains the desired number of Pod replicas.
30+
31+
- **PersistentVolume controller:** Manages volume attachment and detachment for stateful workloads.
32+
33+
## Considerations {#considerations}
34+
35+
- **Storage Failures:** If a persistent volume becomes unavailable, recovery steps may be required.
36+
37+
- **Application Errors:** Kubernetes can restart containers, but underlying application issues must be addressed separately.
38+
39+
## {{% heading "whatsnext" %}}
40+
41+
- Read more about [Pods](/docs/concepts/workloads/pods/)
42+
- Learn about [Kubernetes Controllers](/docs/concepts/architecture/controller/)
43+
- Explore [PersistentVolumes](/docs/concepts/storage/persistent-volumes/)
44+
- Read about [node autoscaling](/docs/concepts/cluster-administration/node-autoscaling/). Node autoscaling
45+
also provides automatic healing if or when nodes fail in your cluster.

0 commit comments

Comments
 (0)