About machine health checks
You can use machine health checks to detect and remediate unhealthy machines automatically, limiting disruption to the targeted machine pool.
|
|
You can only apply a machine health check to machines that are managed by compute machine sets or control plane machine sets. |
To monitor machine health, create a resource to define the configuration for a controller. Set a condition to check, such as staying in the NotReady status for five minutes or displaying a permanent condition in the node-problem-detector, and a label for the set of machines to monitor.
The controller that observes a MachineHealthCheck resource checks for the defined condition. If a machine fails the health check, the machine is automatically deleted and one is created to take its place. When a machine is deleted, you see a machine deleted event.
To limit disruptive impact of the machine deletion, the controller drains and deletes only one node at a time. If there are more unhealthy machines than the maxUnhealthy threshold allows for in the targeted pool of machines, remediation stops and therefore enables manual intervention.
|
|
Consider the timeouts carefully, accounting for workloads and requirements.
|
To stop the check, remove the resource.