Exec probe
An exec probe is a Kubernetes probe that runs a command inside a container and evaluates whether it exits successfully.
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.
Related concepts
- liveness checkkind of · A liveness check is an automated health test that determines whether a running workload remains functional or should be restarted.
- readiness checkkind of · A readiness check is a health probe that determines whether a running service or workload is prepared to receive requests or traffic.
- shell scriptuses · Bash is a Unix command-line shell and scripting language for executing commands interactively and through scripts.
- http get probealternative to · An HTTP GET probe is a Kubernetes liveness-check mechanism that sends an HTTP GET request to a specified path and port in a container and succeeds for a non-error response.
- file systemuses · A file system is a software-managed structure and interface for organizing, naming, storing, and accessing files and directories on storage.
- thresholdconfigured by · A threshold is a boundary value against which a quantity is compared to determine a decision, classification, or action.
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.

