liveness probe

A health check that answers only whether a process is alive enough to keep running; if it keeps failing, the orchestrator, such as Kubernetes, restarts it.

Checking dependencies in liveness can restart every pod at once during a brief outage.

In more detail

It should fail only for problems a restart can fix, such as a stuck process. Keep dependency checks out of it, or a database outage restarts every instance at once.

Examples

livenessProbe:
  httpGet:
    path: /
    port: 8080
  initialDelaySeconds: 5
Go: a small /health handler that writes ok

Related terms

Related guides

Taught in

References

Certification courses