Kubernetes liveness and readiness probes solve two different production problems, and mixing them up creates outages that look like application bugs. The liveness vs readiness probe decision is simple to state: liveness asks whether restarting this container would help, and readiness asks whether this Pod can serve traffic now. A running container is not necessarily ready for traffic, and a stuck application may need a restart while its process still runs. This guide shows the difference with real YAML, timing numbers, failure scenarios and kubectl debugging steps.
What Kubernetes liveness and readiness probes control in production
Kubernetes liveness and readiness probes give the kubelet two different instructions. Liveness decides whether restarting a container would help, while readiness decides whether the Pod should receive Service traffic now. Startup probes protect slow boots by holding both checks back until the application reports that startup finished.
A probe is a diagnostic that the kubelet runs against a container on the node where the Pod lives. The kubelet does not ask the Service or a load balancer for an opinion. It runs the check locally, counts consecutive results, and then takes the action tied to that probe type. That action is the whole design point, so choose each probe by the action you want, not by the word health.
Liveness exists for states a restart can fix. The classic case is a deadlock: the process is running, the port may still accept connections, but worker threads wait on a lock that will never clear. Restarting the container clears the stuck state, so liveness failure leads to a kill and a restart under the Pod restart policy. If your process exits on fatal errors by itself, the kubelet already restarts it, and a liveness probe adds value only when the process can hang without exiting.
Readiness exists for states that time or a dependency recovery can fix. A Pod warming a cache, loading reference data, waiting for a database pool, or shedding load during an overload should stop receiving new requests without being restarted. When readiness fails, the Pod ready condition becomes false and the EndpointSlice controller removes the Pod IP address from matching Service EndpointSlices. When readiness passes again, the Pod returns to traffic. Nothing restarts, and in-flight work inside the container keeps running.
Startup probes cover the gap before either question makes sense. Many services need 40 to 120 seconds to load models, run migrations, or warm connection pools. A strict liveness probe would kill those containers before they finish booting. A startup probe holds liveness and readiness back until it succeeds once, so slow boots get a fair runway and liveness can stay strict after startup. Probe failures also surface in CrashLoopBackOff diagnosis, because a container killed by liveness restarts with backoff and exit code 143. That is why the liveness vs readiness probe distinction belongs in design reviews, not only in incident retrospectives.
The 970+ Incident Handbook & K8s Runbooks are exclusive to subscribers — unlock for FREE
Get battle-tested production runbooks, AWS architecture blueprints, and zero-downtime CI/CD post-mortems sent directly to your inbox. 100% free, no spam.
Liveness vs readiness probe: what Kubernetes liveness and readiness probes decide
The liveness vs readiness probe choice comes down to one question: would a restart fix this state? If yes, the check belongs in liveness. If the Pod should only stop receiving traffic for a while, the check belongs in readiness. If neither action helps, the check belongs in neither probe.
The comparison matters because each probe wires the same failed check to a different outcome. Put a database check in liveness and a short database outage restarts every replica at once. Put a deadlock check only in readiness and the Pod leaves traffic but stays wedged forever, quietly reducing capacity. The table below states the decision in operational terms.
| Question | Liveness probe | Readiness probe | Startup probe |
|---|---|---|---|
| What it asks | Is this container stuck beyond self recovery? | Can this Pod serve traffic now? | Has startup finished? |
| Action on failure | Kubelet kills and restarts the container | Pod leaves Service EndpointSlices, no restart | Kubelet kills the container after the startup budget ends |
| Runs when | For the life of the container | For the life of the container | Only until first success |
| Dependency checks | Keep out | Allowed, with care | Match the liveness endpoint |
| successThreshold | Must be 1 | 1 or more | Must be 1 |
A useful review question for every probe endpoint is: what should Kubernetes do when this returns failure at 03:00 during a dependency outage? If the honest answer is "wait and stop sending traffic", the check is readiness. If the honest answer is "this process will never recover without a restart", the check is liveness. If the honest answer is "page a human and change nothing", the check belongs in metrics and alerts, not in a probe.
The same low-cost HTTP endpoint can serve both probes when the application has one health route, but give liveness a higher failureThreshold. That pattern lets readiness pull the Pod out of traffic first, and only a longer run of failures triggers a restart. Separate endpoints, such as /healthz for liveness and /ready for readiness, make the intent clearer during incidents and let readiness include dependency checks that liveness must never see.
Liveness vs readiness probe timing: how Kubernetes liveness and readiness probes run
Kubernetes liveness and readiness probes run on a schedule set by initialDelaySeconds and periodSeconds, with timeoutSeconds bounding each attempt. Consecutive failures count toward failureThreshold, and consecutive successes count toward successThreshold. Defaults are period 10 seconds, timeout 1 second and failureThreshold 3, so tuning changes detection speed directly.
Each probe waits initialDelaySeconds after container start, then runs every periodSeconds. A check that takes longer than timeoutSeconds counts as a failure. The kubelet records Success, Failure or Unknown for each attempt. Failure for liveness or startup means the kubelet kills the container subject to the restart policy. Failure for readiness means the Pod is marked not ready and stops receiving traffic from matching Services. Unknown means the diagnostic itself failed, so the kubelet takes no action and checks again.
The timing fields interact as simple arithmetic. Time to act on a failing liveness probe is roughly periodSeconds multiplied by failureThreshold, plus the timeout of the final attempt. With periodSeconds 10 and failureThreshold 3, a wedged container is restarted after about 30 seconds of failed checks. With periodSeconds 5 and failureThreshold 2, a readiness failure removes the Pod from endpoints after about 10 seconds. Shorter detection removes bad Pods faster, but it also reacts to brief pauses such as garbage collection stalls, CPU throttling and node pressure.
Two defaults surprise teams. First, timeoutSeconds defaults to 1 second, which is tight for an endpoint that does any real work under load. Second, successThreshold must be 1 for liveness and startup probes, while readiness may require several consecutive successes before the Pod rejoins traffic. That readiness option damps flapping when a dependency is recovering unevenly.
Startup timing has its own budget. The startup window is roughly initialDelaySeconds plus failureThreshold multiplied by periodSeconds. A startup probe with periodSeconds 10 and failureThreshold 30 allows about 300 seconds for boot. Size that budget from measured cold-start times on your slowest node class, including image pull variance and migration time, rather than copying a number from a tutorial. The Kubernetes production runbook treats probe events as a first-class triage signal for the same reason: probe timing explains many restart and endpoint symptoms.
Kubernetes liveness and readiness probes by mechanism: HTTP, TCP, exec and gRPC
Kubernetes liveness and readiness probes support four mechanisms: httpGet, tcpSocket, exec and grpc. HTTP suits web services, TCP suits simple port checks, exec suits local state checks, and gRPC suits services that implement the gRPC health protocol. Each probe defines exactly one mechanism, so pick the cheapest check that proves the right thing.
The httpGet mechanism sends an HTTP GET to the Pod IP address on a port and path. A status code from 200 to 399 counts as success. This is the default choice for HTTP services because the endpoint can report internal state cheaply. Keep the liveness route shallow: return success when the process can make progress, without querying databases or downstream APIs. Let the readiness route report whether the Pod can serve requests, which may include a bounded dependency check with its own short timeout.
The tcpSocket mechanism opens a TCP connection to a port. Success means the port accepted the connection. TCP checks suit databases, brokers and other non-HTTP listeners where an open port is a fair signal. The limit is depth: a process can accept connections while its worker pool is deadlocked, so TCP liveness proves reachability, not progress.
The exec mechanism runs a command inside the container and treats exit code 0 as success. Exec suits local file or process state, such as checking a heartbeat file written by a worker loop. The cost is real: each exec probe forks processes, and at high Pod density with short intervals that overhead lands on node CPU. Prefer HTTP or gRPC where the application can expose them, and keep exec commands small and fast.
The grpc mechanism calls the gRPC health checking protocol and treats a SERVING status as success. Native gRPC probes are stable since Kubernetes v1.27, so gRPC services no longer need an HTTP sidecar route or a health probe binary in the image. A minimal gRPC liveness example looks like this:
livenessProbe:
grpc:
port: 50051
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
Whichever mechanism you choose, the endpoint contract matters more than the transport. The check should be cheap, local for liveness, bounded for readiness, and honest about the state it claims to measure.
Workload type should drive the choice. An HTTP checkout API fits httpGet with separate /healthz and /ready routes. A gRPC inventory service fits the grpc mechanism with a SERVING status that reflects internal readiness. A queue worker with no listener can use an exec check against a heartbeat file updated by its main loop, with a period long enough to keep fork overhead low. A TCP check on a database port proves the listener accepts connections, but it says nothing about query health, so treat TCP readiness as a weak signal and pair it with application-level metrics.
Complete Kubernetes liveness and readiness probes YAML example
A complete Kubernetes liveness and readiness probes setup uses three checks with separate jobs: startup grants boot time, liveness restarts only stuck containers, and readiness gates Service traffic. The Deployment below uses /healthz on port 8080 for liveness and /ready on port 8080 for readiness, with timing matched to each job.
The Deployment below is a realistic starting point for an HTTP service that takes up to about two minutes to warm caches on a cold node. The image name uses a placeholder registry, and the probe paths match the contract described earlier: /healthz proves local progress, and /ready proves the Pod can serve requests.
apiVersion: apps/v1
kind: Deployment
metadata:
name: checkout-api
labels:
app: checkout-api
spec:
replicas: 3
selector:
matchLabels:
app: checkout-api
template:
metadata:
labels:
app: checkout-api
spec:
terminationGracePeriodSeconds: 45
containers:
- name: checkout-api
image: registry.example.com/checkout-api:1.4.2
ports:
- containerPort: 8080
startupProbe:
httpGet:
path: /healthz
port: 8080
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 24
livenessProbe:
httpGet:
path: /healthz
port: 8080
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
readinessProbe:
httpGet:
path: /ready
port: 8080
periodSeconds: 5
timeoutSeconds: 2
failureThreshold: 2
successThreshold: 2
Read the timing as three separate budgets. The startup probe allows 24 failures at 5 second intervals, so the container gets about 120 seconds to finish booting before the kubelet gives up. The liveness probe checks every 10 seconds and restarts after 3 consecutive failures, so a wedged process is replaced after roughly 30 seconds. The readiness probe checks every 5 seconds, leaves traffic after 2 failures, and needs 2 consecutive successes before rejoining, which reduces endpoint flapping during a shaky recovery.
The /ready handler behind this YAML should verify the small set of things required to serve requests: the HTTP listener is accepting, the connection pool has headroom, and required caches are warm. It should not run expensive queries or fan out to every downstream service. The /healthz handler should answer from local process state only, such as a recent event loop heartbeat. Rollout behaviour ties into Kubernetes deployment strategies, because a Deployment counts a new Pod as available only after readiness passes.
Kubernetes liveness and readiness probes for slow cold starts
Slow cold starts need Kubernetes liveness and readiness probes sequenced by a startup probe, not a long liveness delay. The startup probe holds liveness and readiness back until boot completes, so a JVM service, migration job or cache warm-up gets minutes to start while liveness stays strict afterwards.
Consider a Java service that loads a 400 MB reference dataset before opening its listener. On a warm node it starts in 35 seconds. On a cold node with a fresh image pull and a slow disk, startup takes 95 seconds. A liveness probe with initialDelaySeconds 10, periodSeconds 10 and failureThreshold 3 kills the container at about 40 seconds, every time, on exactly the nodes where startup is slowest. The Pod enters a restart loop that no application fix can solve, because the monitoring budget is shorter than the boot time.
Raising initialDelaySeconds to 120 seconds stops the loop, but it creates a second problem: every later liveness check also waits behind that delay logic at container start, and the team loses fast deadlock detection after restarts. The startup probe separates the two concerns. Boot gets a generous budget, and once startup succeeds, liveness runs with tight timing for the rest of the container life.
Size the startup budget from evidence. Measure cold-start duration across node classes and deploy conditions, then set failureThreshold multiplied by periodSeconds above the slowest realistic boot, with headroom for a slow migration. If startup takes 95 seconds at the tail, periodSeconds 5 with failureThreshold 30 gives about 150 seconds. If the application can report progress, point the startup probe at the same shallow endpoint as liveness so one route serves both checks.
Readiness still matters after startup succeeds. Startup success means the process finished initialising; readiness decides whether this replica should take traffic yet. A Pod can pass startup, then fail readiness while a connection pool fills or a leader election settles. That sequence is healthy: the container is alive, the Pod stays out of endpoints, and traffic arrives only when the service can handle it.
Kubernetes liveness and readiness probes: liveness vs readiness probe placement in outages
During dependency outages, Kubernetes liveness and readiness probes must stay separated: liveness checks local progress only, and readiness reflects whether dependencies allow useful responses. A liveness check tied to a database turns a short outage into a restart storm, while readiness removes Pods from traffic and lets them recover in place.
The most expensive probe mistake in production is a liveness endpoint that queries a database. Picture a payment API whose /healthz handler runs a quick database query. The database hits connection pool saturation during a traffic surge, query latency rises from 3 milliseconds to 3 seconds, and every Pod fails liveness within the same 30 second window. The kubelet restarts all replicas. The restarts do not repair the database, they add connection churn and cold caches to an already stressed dependency, and the outage deepens. The Kubernetes documentation warns about exactly this cascading failure pattern.
The fix is placement, not softer thresholds. Move the database check to readiness. When the database slows down, readiness fails, Pods leave Service endpoints, and clients stop sending requests that would only error. The containers stay alive, keep their warm pools, and rejoin traffic when the dependency recovers. Liveness keeps checking local progress, such as an event loop heartbeat or a worker thread timestamp, so a true deadlock still triggers a restart during the same incident.
Readiness dependency checks need their own discipline. A readiness handler that calls five downstream services with no timeouts turns probe latency into a traffic signal nobody can interpret. Bound each dependency check with a short internal timeout, check only dependencies required to serve requests, and prefer local signals such as pool headroom over live downstream calls where the application can report them. A readiness check that fails for a non-critical dependency drains healthy capacity during partial outages.
Recovery routing is the quiet benefit. When a dependency recovers unevenly, readiness successThreshold above 1 requires consecutive passes before a Pod rejoins endpoints. That small hysteresis prevents a recovering Pod from taking a burst of traffic, failing again, and flapping in and out of the EndpointSlice while clients watch connection errors rise.
Tuning Kubernetes liveness and readiness probes with real timing numbers
Tuning Kubernetes liveness and readiness probes means setting detection budgets, not copying defaults. Readiness usually checks every 5 seconds with failureThreshold 2 or 3, liveness checks every 10 to 20 seconds with failureThreshold 3, and timeoutSeconds stays above the slowest healthy probe response measured under load.
Start from the response time you can tolerate. If a wedged container must be replaced within a minute, liveness periodSeconds 10 with failureThreshold 3 detects in about 30 seconds and leaves margin for the restart itself. If traffic must leave a bad Pod within 15 seconds, readiness periodSeconds 5 with failureThreshold 2 or 3 reacts in about 10 to 15 seconds. These are starting points for typical HTTP services, and the right values come from your error budget and your measured probe latency. The liveness vs readiness probe timing split should reflect that difference: readiness reacts faster because removing traffic is reversible, while liveness waits longer because restarting is destructive.
Measure the probe endpoint under load before setting timeoutSeconds. A handler that answers in 20 milliseconds on an idle Pod may take 800 milliseconds during a garbage collection pause or CPU throttling. The default timeout of 1 second then counts healthy pauses as failures. Set timeoutSeconds above the slow healthy response, often 2 to 3 seconds for HTTP checks, and keep the handler cheap enough that the timeout stays honest. A probe endpoint that needs 5 seconds to answer is doing work that belongs elsewhere.
Failure thresholds trade detection speed against noise tolerance. failureThreshold 1 restarts on a single miss and turns transient node pressure into restarts. failureThreshold 3 with periodSeconds 10 tolerates two bad checks and still reacts within half a minute. For readiness, failureThreshold 2 or 3 removes traffic quickly while ignoring a single dropped check. During rollouts, remember that readiness also gates availability: a Deployment with maxUnavailable 0 waits for new Pods to pass readiness before removing old ones, so slow readiness directly slows every release.
Revisit probe timing after incidents and after runtime changes. A new JVM version, a larger cache, or a busier node class changes startup and pause behaviour. Treat probe values as production configuration with owners and review dates, and record the measured startup time and probe latency that justify each number in the manifest comments or the service runbook.
Kubernetes liveness and readiness probes during rollouts and shutdown
During rollouts, Kubernetes liveness and readiness probes decide when new Pods take traffic and when old Pods drain. Readiness gates availability for the Deployment, while shutdown needs endpoint removal plus a preStop pause and enough termination grace for in-flight requests to finish before the container stops.
A rolling update is a probe test at scale. The Deployment creates new Pods, and each new Pod receives traffic only after readiness passes. With maxUnavailable 0, old Pods stay until replacements are ready, so a broken readiness check stalls the rollout instead of dropping capacity. That stall is protective, but it also means a readiness endpoint that depends on a slow migration can block every release. Watch rollout progress with kubectl rollout status and read probe events before assuming the new image is faulty.
Shutdown has the mirror problem. When a Pod is deleted, the EndpointSlice ready condition is set to false so load balancers stop regular traffic, and the kubelet sends SIGTERM to the container. Endpoint removal and signal delivery race each other across nodes, so a container that exits instantly can drop requests that arrived just before deletion. A preStop hook that sleeps briefly gives endpoint propagation time to catch up, and terminationGracePeriodSeconds must cover the longest in-flight request plus connection draining. The Pod level default grace is 30 seconds when unspecified.
A practical shutdown sequence looks like this in the container spec:
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "sleep 10"]
Pair that pause with an application that stops accepting new work on SIGTERM and finishes active requests. Readiness can also support deliberate draining: an application can fail its readiness endpoint when it begins shutdown, which removes the Pod from endpoints while the process still serves existing connections. Probe-level terminationGracePeriodSeconds, stable since Kubernetes v1.28, can override the Pod grace for liveness and startup kills, but it cannot be set on readiness probes.
Debugging Kubernetes liveness and readiness probes with kubectl
Debugging Kubernetes liveness and readiness probes starts with Pod events and conditions, not manifest guesses. kubectl describe pod shows probe failure messages and restart counts, EndpointSlices show whether readiness removed the Pod, and previous logs separate probe kills from application exits during triage.
Start with the Pod state and events. Probe failures appear as Unhealthy events with messages such as "Liveness probe failed" or "Readiness probe failed", often with the HTTP status or connection error attached. Restart counts and Last State exit codes separate probe kills from crashes: exit code 143 usually means SIGTERM from the kubelet after liveness failures, while exit code 137 points at OOMKill or SIGKILL.
kubectl get pods -n production -o wide
kubectl describe pod checkout-api-7d9f8c6b5-2xk4p -n production
kubectl get events -n production --sort-by=.lastTimestamp
kubectl logs checkout-api-7d9f8c6b5-2xk4p -n production --previous
Then check traffic state. If the Pod runs but receives no requests, inspect conditions and EndpointSlices. A Ready condition of False with passing liveness points at readiness: wrong path, wrong port, slow dependency check, or a handler returning 500. Confirm the Service selector matches Pod labels before changing probe values, because a label mismatch produces the same empty endpoint symptom.
kubectl get pod checkout-api-7d9f8c6b5-2xk4p -n production -o jsonpath='{.status.conditions}'
kubectl get endpointslices -n production -l kubernetes.io/service-name=checkout-api
kubectl exec -n production checkout-api-7d9f8c6b5-2xk4p -- wget -qO- http://127.0.0.1:8080/ready
Test the probe endpoint from inside the container when the event message is vague. A 404 means the path is wrong, a connection refusal means the listener is down or the port is wrong, and a slow response means the handler does too much work. Compare the measured response time with timeoutSeconds before raising thresholds, because threshold changes cannot fix an endpoint that times out on every check. The Kubernetes production problems guide uses the same event-first order for wider triage.
During a rollout, watch endpoints while new Pods start. If new Pods pass startup but stay out of EndpointSlices, readiness is the blocker, and the Kubernetes deployment strategies guide explains how maxUnavailable and maxSurge change what that stall means for capacity. If Pods restart with exit code 143, liveness or startup timing is the blocker, and the Kubernetes production runbook gives the wider failure pattern context for the same symptoms.
Kubernetes liveness and readiness probes troubleshooting table
Most Kubernetes liveness and readiness probes incidents match a short list of signatures: restart loops with exit code 143, Pods running but never Ready, empty EndpointSlices, and probe timeouts under load. The table below maps each signature to its likely cause and the first fix to try.
Use the signature before changing values. Each row pairs the observable symptom with the probe design error that usually causes it, so the fix changes the right field instead of loosening every threshold at once.
| Signature | Likely cause | First fix |
|---|---|---|
| Restart loop, exit code 143, Liveness probe failed events | Liveness budget shorter than startup time | Add a startup probe sized from measured boot time |
| All replicas restart during a database outage | Liveness endpoint queries the database | Move dependency checks to readiness, keep liveness local |
| Pod Running but never Ready, no restarts | Readiness path, port or handler returns failure | Test /ready inside the container and compare port and path |
| Service has no endpoints during a rollout | New Pods fail readiness, old Pods already removed | Set maxUnavailable 0 and fix the readiness handler |
| Probe timeouts only under load | Handler does expensive work or timeoutSeconds is 1 | Make the handler cheap and set timeout above slow healthy latency |
| Readiness flaps in and out of endpoints | Dependency recovering unevenly, successThreshold 1 | Raise readiness successThreshold to 2 and bound dependency checks |
| Exec probe spikes node CPU | Exec forks processes at short intervals | Switch to httpGet or grpc, or lengthen periodSeconds |
| Requests drop during Pod deletion | No drain pause before SIGTERM handling | Add a preStop sleep and size termination grace to request duration |
Two rows deserve emphasis because they hide behind healthy-looking dashboards. A Pod can show Running with zero restarts while readiness quietly keeps it out of every EndpointSlice, so always check conditions and endpoints when traffic looks wrong. And a restart loop with exit code 143 is often the probe working as configured against a startup budget that reality outgrew, which is why the fix belongs in startup timing rather than in application code.
Senior lessons: liveness vs readiness probe discipline in production
Senior teams treat Kubernetes liveness and readiness probes as traffic and restart policy, not health decoration. They keep liveness local and rare, let readiness reflect serving capacity, size startup budgets from measured boots, and review probe values after incidents because small timing choices decide whether failures stay local or cascade.
The first lesson is restraint with liveness. Every liveness probe is a standing order to restart a container when a check fails often enough. That order should fire only for states a restart repairs, such as deadlocks and wedged event loops. Teams that point liveness at deep health endpoints convert dependency incidents into restart storms, then blame the platform for behaviour their own manifest requested. Keep liveness shallow, local and boring.
The second lesson is honesty in readiness. Readiness should answer whether this Pod can serve the next request well. That includes warm caches, pool headroom and required dependencies, bounded by short internal timeouts. A readiness check that always returns success is decoration, and a readiness check that calls every downstream service is a coupling diagram. Both extremes fail during the incidents readiness exists for.
The third lesson is measurement. Startup budgets, timeouts and thresholds should trace back to observed boot times, probe latencies and pause behaviour on real node classes. Copying tutorial values works until the first cold node, the first large cache, or the first traffic surge changes the numbers. Record the measurements next to the manifest so the next engineer knows which values are load-bearing.
The fourth lesson is review after incidents. Probe configuration sits in the blast radius of rollouts, dependency outages and recovery routing, so post-incident reviews should ask what the probes did during the event. Did readiness drain capacity too aggressively? Did liveness restart healthy Pods? Did startup budgets hold on cold nodes? Those answers turn probe tuning from folklore into an operational record that improves with every release. A liveness vs readiness probe review after each incident keeps those standing orders honest.
Frequently Asked Questions
Direct answers to common technical, architectural, and production troubleshooting questions.
What is the difference in a liveness vs readiness probe decision?
Liveness decides whether restarting the container would help, and repeated failures past failureThreshold trigger a restart. Readiness decides whether the Pod can serve traffic now, and failure marks the Pod unready and removes it from Service endpoints without a restart. Choose by the action you want when the check fails.
How do Kubernetes liveness and readiness probes work with a startup probe?
A startup probe runs first and holds liveness and readiness back until it succeeds. Slow applications get a startup budget of roughly initialDelaySeconds plus failureThreshold multiplied by periodSeconds. After startup succeeds, liveness and readiness run normally, so liveness can stay strict without killing slow boots.
Should a liveness vs readiness probe check the database?
The database check belongs in readiness, not liveness. If liveness queries the database, a short database outage fails every replica and restarts healthy containers, which deepens the outage. Readiness removes Pods from traffic while the dependency recovers and lets them rejoin without restarts.
What timing values should Kubernetes liveness and readiness probes use?
Start with readiness periodSeconds 5 and failureThreshold 2 or 3, liveness periodSeconds 10 to 20 with failureThreshold 3, and timeoutSeconds above the slowest healthy probe response, often 2 to 3 seconds. Size startup failureThreshold multiplied by periodSeconds above the slowest measured cold start.
Why does a Pod keep restarting when Kubernetes liveness and readiness probes look correct?
Check events with kubectl describe pod. Exit code 143 with Liveness probe failed messages usually means the liveness budget is shorter than real startup or pause behaviour. Add or resize the startup probe, test the probe endpoint inside the container, and compare response time with timeoutSeconds before changing thresholds.