liveBook · Manning

Self-healing mechanism

As explained in Kubernetes in Action, Second Edition

A self-healing system automatically detects or tolerates failures and restores affected workloads or services without requiring immediate manual intervention.

A self-healing mechanism keeps applications available by detecting failures, restarting failed applications, and moving workloads from failed nodes to healthy ones. Kubernetes provides this behavior so developers can focus on application logic instead of implementing infrastructure recovery. section 1.2.1 section 1.2.2

Self-healing handles two common failure types:

  • Software failure: automatically restart an application that crashes or runs out of memory. section 1.2.2
  • Hardware failure: move applications from a failed node to remaining healthy nodes. section 1.2.1 section 1.2.2
  • Operational effect: preserve service when capacity permits, while operators repair failed hardware later. section 1.2.2

A leaking application process

An application gradually consumes memory and crashes after several hours. Kubernetes restarts it automatically, allowing the service to continue. If the worker node itself fails, Kubernetes moves the application to a healthy node instead. section 1.2.2

Figure 1.8 Kubernetes is to a computer cluster what an operating system is to a computer.
figure

Use the operating-system analogy to place Kubernetes between applications and the underlying computer cluster. section 1.2.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Explains automatic restarts and workload relocation for software and hardware failures, but does not detail detection or controller internals.
Examples
Uses an application that exhausts memory and a worker node failure requiring application movement.
What you can do after
Evaluate/understand how Kubernetes preserves service through automatic application restart and relocation after node failure.
How it connects
Connects self-healing with Kubernetes, worker nodes, horizontal scaling, load balancing, service discovery, and leader election.

Also explained in

Compare how 3 books explain self-healing mechanism →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.