liveBook · Manning

Exec probe

As explained in Kubernetes for Developers

A command-based probe is a Kubernetes probe that runs a command in a container and evaluates its exit status.

An exec probe runs a command inside a container and treats exit code 0 as success. For background workers, it detects processes that remain running but become stuck, allowing Kubernetes to restart them. section 10.4

Worker liveness command

A Deployment can run ./check_liveness.sh with the timestamp file and a 300-second freshness limit. Kubernetes treats a successful command as live and restarts the container after failed liveness checks.

How Kubernetes for Developers covers it

How deep it goes
Explains exit-status semantics and gives a heartbeat-file implementation with worker, script, and Deployment configuration.
Examples
Uses a worker timestamp file, a Bash freshness script, and a Kubernetes Deployment probe.
What you can do after
Configure an exec-based liveness check for a background worker and tune its freshness and probe timing.
How it connects
Connects liveness probes with background tasks, restart policies, readiness probes, and container health.

Also explained in

Compare how 2 books explain exec probe →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes for Developers. The section links point to the parts of the book it draws on.