liveBook · Manning

Exec probe

An exec probe is a Kubernetes probe that runs a command inside a container and evaluates whether it exits successfully.

How 2 Manning books explain it

Kubernetes in Action, Second Edition

An exec probe is a Kubernetes liveness-check mechanism that runs a command inside a container and succeeds when the command exits with code zero before its timeout.

How it is used
Uses an in-container command as a liveness check for applications without HTTP endpoints or TCP connections.
How deep it goes
Defines exit-code and timeout semantics, shows a manifest, and notes resource costs without detailing implementation internals.
Examples
Runs /usr/bin/healthcheck every two seconds with a one-second timeout and failureThreshold of one.
What you can do after
Configure an exec liveness probe and select lightweight command, timeout, and failure-threshold settings.

Read how Kubernetes in Action, Second Edition explains exec probe →

Kubernetes for Developers

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

How it is used
Detects stuck or hung background-task containers so Kubernetes can restart them.
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.

Read how Kubernetes for Developers explains exec probe →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.