, , , , ,

Readiness, Liveness and Startup Probes: A Kubernetes Failure-Injection Guide

Posted by

–

Kubernetes readiness, liveness, and startup probes infographic showing health checks, YAML configuration, failure injection testing, common failure scenarios, and recovery verification.

Introduction

A Kubernetes Pod can show Running while its application is unable to serve requests correctly.

An application may still be loading configuration, waiting for its database connection, recovering from a temporary problem, or stuck in a process that cannot make progress.

Kubernetes needs a way to detect these conditions and respond correctly.

It provides three important container health checks:

  • Readiness probes determine whether a container can receive normal Service traffic.
  • Liveness probes determine whether a container should be restarted.
  • Startup probes protect applications that need extra time to initialize.

These probes solve different problems. Using the wrong probe can cause unnecessary restarts, failed requests, or traffic reaching an application that is not ready.

This guide explains the differences and shows how to test them through controlled failure injection. You will deploy a small application, simulate a slow startup, make it unready, trigger a liveness restart, inspect Kubernetes events, and restore the application.

All experiments use an isolated Kubernetes namespace. Do not run these failure-injection exercises against production workloads.

1. Understand the Three Kubernetes Probes

Kubernetes uses the kubelet to run container probes. The kubelet performs a configured diagnostic at regular intervals.

The result determines what Kubernetes does next.

ProbeMain questionWhat happens when it fails?
ReadinessCan this application receive traffic now?Pod becomes not ready for normal Service traffic
LivenessIs this application still healthy enough to continue running?Container is restarted after the failure threshold
StartupHas this application completed its initial startup?Container is restarted if startup never succeeds within the allowed attempts

The most important difference is their intended action.

A readiness failure does not restart the container. A liveness failure can restart it. A startup probe controls the initial period before liveness and readiness checks begin.

Kubernetes documents these behaviours in its official probe documentation.

2. How a Readiness Probe Works

A readiness probe checks whether an application can accept requests.

A container may be running but temporarily unable to serve traffic. For example:

  • The application is loading configuration.
  • A required cache is still warming.
  • A local queue is full.
  • A required dependency is unavailable.
  • The application is recovering from a temporary fault.
  • The application is performing maintenance.

When readiness fails, Kubernetes marks the Pod as not ready.

The Pod remains running. Kubernetes continues checking readiness, so the Pod can become ready again when the application recovers.

For Pods selected by a Service, readiness affects their EndpointSlice conditions. An endpoint marked not ready is not normally selected for Service traffic.

Example readiness probe

readinessProbe:
  httpGet:
    path: /readyz
    port: 8080
  periodSeconds: 5
  timeoutSeconds: 2
  failureThreshold: 2
  successThreshold: 1

This example checks /readyz every five seconds.

Two consecutive failures cause the readiness check to fail. One successful probe is enough to recover because successThreshold is one.

What readiness failure should not do

A temporary readiness failure should not automatically restart a healthy application.

For example, a service may temporarily lose its connection to a required database. The application process may still be healthy, but it cannot complete requests correctly.

A readiness check can prevent that instance from receiving normal traffic until the dependency recovers.

However, do not include every optional dependency in readiness. Decide which dependencies are essential to serving the application’s actual requests.

3. How a Liveness Probe Works

A liveness probe checks whether an application is still able to make progress.

It is useful when a process can remain running but enter an unrecoverable state.

Examples include:

  • An application thread becomes permanently stuck.
  • An internal deadlock prevents requests from completing.
  • A worker process stops making progress.
  • An internal state becomes corrupted and requires a restart.

When the liveness probe fails enough times in a row, the kubelet terminates the container. The container is then handled according to the Pod’s restart policy.

Example liveness probe

livenessProbe:
  httpGet:
    path: /livez
    port: 8080
  periodSeconds: 5
  timeoutSeconds: 2
  failureThreshold: 3

With this configuration, three consecutive failed checks cause Kubernetes to restart the container.

The exact restart time depends on probe scheduling, timeouts, and container termination behaviour. Do not treat the multiplication of interval and threshold as an exact stopwatch.

A critical liveness mistake

Do not make liveness depend on every external service.

Imagine that all application Pods use the same database. The database becomes temporarily unavailable.

If every Pod’s liveness endpoint fails because the database is unavailable, Kubernetes may restart all the Pods.

This does not repair the database. It can increase the recovery workload and make the application less stable.

A useful design is:

  • Liveness checks whether the application process itself can make progress.
  • Readiness checks whether the application can currently serve its required workload.
  • Dependency failures should be handled through appropriate timeouts, circuit breakers, retry rules, and readiness behaviour.

Kubernetes explicitly warns that poorly designed liveness probes can lead to cascading failures under load.

4. How a Startup Probe Works

A startup probe checks whether an application has completed its initial startup.

It is especially useful for applications that need time to:

  • Load large configuration files.
  • Initialise application components.
  • Warm caches.
  • Load machine-learning models.
  • Perform required startup checks.
  • Complete controlled database initialization.

When a startup probe is configured, Kubernetes does not begin liveness or readiness probing until the startup probe succeeds.

This prevents a slow application from being restarted by an overly aggressive liveness check during initialization.

Example startup probe

startupProbe:
  httpGet:
    path: /startupz
    port: 8080
  periodSeconds: 5
  timeoutSeconds: 2
  failureThreshold: 12

The configured failure window is approximately:

Startup allowance = failureThreshold × periodSeconds

For this example:

12 × 5 = 60 seconds.

The application gets roughly 60 seconds of startup-probe failure tolerance before Kubernetes treats startup as failed. Actual timing can vary because of probe scheduling and timeouts.

After the startup probe succeeds, it stops running. Liveness and readiness probes then take over.

This is important: a startup probe is not a replacement for ongoing readiness and liveness checks.

5. Readiness vs Liveness vs Startup: Practical Comparison

BehaviourReadinessLivenessStartup
Checks application availabilityYesChecks process healthChecks initial startup
Runs throughout container lifecycleYesAfter startup succeeds, when configuredOnly until first success
Can make Pod unreadyYesNot its primary functionBefore startup succeeds, Pod is not ready
Can restart containerNoYesYes
Handles slow initializationCan helpNot its purposeMain purpose
Useful for temporary overloadOftenUsually notNo
Detects unrecoverable deadlockNot reliablyYes, when correctly designedNo
Controls normal Service trafficYesIndirectly through container healthDelays readiness until startup passes

A common production configuration uses all three probes.

This provides separate controls for initialization, ongoing health, and traffic eligibility.

6. Understand Probe Mechanisms

Kubernetes supports four main probe mechanisms.

HTTP GET probe

The kubelet sends an HTTP GET request to the Pod IP address and configured port.

The probe succeeds when the response status is between 200 and 399.

Example:

readinessProbe:
  httpGet:
    path: /readyz
    port: 8080

HTTP probes are useful for web applications and APIs that expose dedicated health endpoints.

TCP socket probe

The kubelet attempts to open a TCP connection to the configured port.

Example:

livenessProbe:
  tcpSocket:
    port: 8080
  periodSeconds: 10

A successful connection shows that something is listening on the port. It does not prove that the application can process business requests correctly.

Exec probe

Kubernetes runs a command inside the container.

Example:

readinessProbe:
  exec:
    command:
      - sh
      - -c
      - test -f /tmp/ready

The probe succeeds when the command exits with status code zero.

Exec probes are useful for checks based on local files or process state.

However, they create a process for each execution. Frequent exec probes across many containers can add CPU overhead.

gRPC probe

A gRPC probe checks an application’s gRPC Health Checking Protocol endpoint.

Example:

livenessProbe:
  grpc:
    port: 50051

The health service must return the SERVING status for the probe to succeed.

Built-in gRPC probes became stable in Kubernetes v1.27. They do not support named ports or probe-level authentication configuration. Review the protocol and TLS requirements before using them.

7. Understand the Most Important Probe Settings

The behaviour of a probe depends on its configuration.

SettingMeaningCommon default
initialDelaySecondsTime to wait before starting the probe0 seconds
periodSecondsTime between probe checks10 seconds
timeoutSecondsMaximum time allowed for one check1 second
failureThresholdConsecutive failures required to declare failure3
successThresholdConsecutive successes required to recover after failure1

A liveness or startup probe must have successThreshold: 1.

Readiness probes can use a higher success threshold when recovery should require several successful checks.

Example calculation

Suppose a liveness probe uses:

periodSeconds: 5
failureThreshold: 3
timeoutSeconds: 2Code language: HTTP (http)

The kubelet checks every five seconds. It needs three consecutive failures.

The rough configured failure window is:

3 × 5 = 15 seconds.

This is not a guaranteed restart time. Probe scheduling, timeouts, and termination grace periods affect the actual result.

Choose realistic values

Very short intervals can create unnecessary load.

Very long intervals can delay fault detection.

Choose thresholds based on actual application behaviour, normal startup time, expected response latency, and recovery characteristics.

8. Prepare the Failure-Injection Lab

Now test the three probes with a small application.

This lab demonstrates:

  1. A slow startup.
  2. A readiness endpoint failure.
  3. A liveness endpoint failure that triggers a restart.
  4. An intentionally unsuitable startup threshold.

Lab requirements

  • A working Kubernetes cluster.
  • kubectl configured for that cluster.
  • Permission to create Deployments, Services, ConfigMaps, and Namespaces.
  • Ability to download the Python container image.
  • A non-production environment.

The lab uses one replica and a small HTTP server.

Create a file named:

probe-lab.yaml

It will contain a ConfigMap, Deployment, and Service.

Step 1: Create the application

The application provides three health endpoints:

  • /startupz returns failure during its simulated 20-second initialization.
  • /readyz returns failure when a marker file exists.
  • /livez returns failure for three probe requests after failure injection.

Use this ConfigMap:

apiVersion: v1
kind: Namespace
metadata:
  name: probe-lab
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: probe-demo-app
  namespace: probe-lab
data:
  server.py: |
    from http.server import BaseHTTPRequestHandler, HTTPServer
    from pathlib import Path
    import time

    TMP = Path("/tmp")
    STARTED_AT = time.monotonic()
    STARTUP_DELAY = 20

    class Handler(BaseHTTPRequestHandler):
        def do_GET(self):
            path = self.path.split("?", 1)[0]
            healthy = False

            if path == "/startupz":
                healthy = (
                    time.monotonic() - STARTED_AT >= STARTUP_DELAY
                )

            elif path == "/readyz":
                healthy = not (TMP / "ready.fail").exists()

            elif path == "/livez":
                marker = TMP / "live-fail-count"

                if marker.exists():
                    try:
                        remaining = int(marker.read_text().strip())
                    except (ValueError, OSError):
                        remaining = 0

                    if remaining > 0:
                        if remaining == 1:
                            marker.unlink(missing_ok=True)
                        else:
                            marker.write_text(str(remaining - 1))

                        healthy = False
                    else:
                        marker.unlink(missing_ok=True)
                        healthy = True
                else:
                    healthy = True

            elif path == "/":
                healthy = True

            self.send_response(200 if healthy else (
                404 if path not in [
                    "/startupz", "/readyz", "/livez", "/"
                ] else 500
            ))
            self.end_headers()
            self.wfile.write(
                b"healthy" if healthy else b"unhealthy"
            )

        def log_message(self, format, *args):
            pass

    HTTPServer(("0.0.0.0", 8080), Handler).serve_forever()

The three endpoints deliberately have different behaviour.

The startup endpoint simulates an application that needs time to initialize. The readiness endpoint allows you to withdraw the Pod from normal Service traffic. The liveness endpoint provides three consecutive failures and then removes its failure marker, allowing the restarted container to recover.

This is a teaching application, not a production health-check implementation.

Step 2: Create the Deployment

Add this Deployment to the same YAML file:

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: probe-demo
  namespace: probe-lab
spec:
  replicas: 1
  selector:
    matchLabels:
      app: probe-demo
  template:
    metadata:
      labels:
        app: probe-demo
    spec:
      automountServiceAccountToken: false
      securityContext:
        fsGroup: 10001
      containers:
        - name: web
          image: python:3.12-slim
          imagePullPolicy: IfNotPresent
          command:
            - python
            - /app/server.py
          ports:
            - name: http
              containerPort: 8080

          startupProbe:
            httpGet:
              path: /startupz
              port: http
            periodSeconds: 5
            timeoutSeconds: 2
            failureThreshold: 12

          readinessProbe:
            httpGet:
              path: /readyz
              port: http
            periodSeconds: 5
            timeoutSeconds: 2
            failureThreshold: 2
            successThreshold: 1

          livenessProbe:
            httpGet:
              path: /livez
              port: http
            periodSeconds: 5
            timeoutSeconds: 2
            failureThreshold: 3

          resources:
            requests:
              cpu: 50m
              memory: 64Mi
            limits:
              cpu: 250m
              memory: 128Mi

          securityContext:
            runAsNonRoot: true
            runAsUser: 10001
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true

          volumeMounts:
            - name: app
              mountPath: /app
              readOnly: true
            - name: tmp
              mountPath: /tmp

      volumes:
        - name: app
          configMap:
            name: probe-demo-app
        - name: tmp
          emptyDir: {}

The application runs as a non-root user. Its application file is mounted read-only. The temporary volume allows the lab to create failure markers without making the container’s root filesystem writable.

Step 3: Create the Service

Add the Service:

---
apiVersion: v1
kind: Service
metadata:
  name: probe-demo
  namespace: probe-lab
spec:
  selector:
    app: probe-demo
  ports:
    - name: http
      port: 80
      targetPort: http
  type: ClusterIPCode language: PHP (php)

The Service selects the Pod using the app: probe-demo label.

Kubernetes uses readiness to determine whether the Pod should receive normal traffic through this Service.

9. Deploy the Lab and Test Startup Behaviour

Apply the YAML:

kubectl apply -f probe-lab.yamlCode language: CSS (css)

Watch the Pod:

kubectl get pods -n probe-lab -wCode language: JavaScript (javascript)

During the simulated initialization, the Pod should remain not ready.

After approximately 20 seconds, the application begins returning success from /startupz.

The startup probe should succeed. Kubernetes can then begin the readiness and liveness checks.

Expected progression:

StageExpected behaviour
Container startsApplication begins its initialization
First startup checks/startupz returns HTTP 500
Initialization completes/startupz returns HTTP 200
Startup probe succeedsReadiness and liveness checks begin
Readiness succeedsPod becomes ready
Liveness succeedsContainer continues running

Inspect the Pod:

kubectl get pods -n probe-labCode language: JavaScript (javascript)

Inspect the Pod’s events:

kubectl describe pod -n probe-lab -l app=probe-demo

You should see startup-probe failures during initialization, followed by successful checks.

The restart count should normally remain zero during this initial startup.

The exact timing depends on when the kubelet schedules its first probe.

10. Failure Injection 1: Make the Readiness Probe Fail

Now simulate a temporary application condition where the process is healthy but cannot accept normal traffic.

Use kubectl exec to create the readiness failure marker:

kubectl exec -n probe-lab deploy/probe-demo -- python -c "from pathlib import Path; Path('/tmp/ready.fail').touch()"Code language: JavaScript (javascript)

Watch the Pod:

kubectl get pods -n probe-lab -wCode language: JavaScript (javascript)

After the configured readiness failures, you should see the Pod become not ready.

The container should remain running.

Inspect the Pod:

kubectl get pods -n probe-labCode language: JavaScript (javascript)

Inspect its Service endpoints:

kubectl get endpointslices \
  -n probe-lab \
  -l kubernetes.io/service-name=probe-demo \
  -o yamlCode language: JavaScript (javascript)

Look at the endpoint’s conditions.ready field.

The endpoint should be marked not ready while the readiness check fails.

Restore readiness

Remove the marker:

kubectl exec -n probe-lab deploy/probe-demo -- python -c "from pathlib import Path; Path('/tmp/ready.fail').unlink(missing_ok=True)"Code language: JavaScript (javascript)

Watch the Pod again:

kubectl get pods -n probe-lab -wCode language: JavaScript (javascript)

The readiness probe should succeed again, allowing the Pod to become ready.

What this experiment proves: Readiness failure removes the Pod from normal Service traffic without requiring a container restart.

11. Failure Injection 2: Trigger a Liveness Restart

Now simulate a process-health problem.

Create a marker that causes the next three liveness requests to fail:

kubectl exec -n probe-lab deploy/probe-demo -- python -c "from pathlib import Path; Path('/tmp/live-fail-count').write_text('3')"Code language: JavaScript (javascript)

Watch the Pod:

kubectl get pods -n probe-lab -wCode language: JavaScript (javascript)

The liveness endpoint fails three consecutive requests.

Kubernetes should restart the container after the configured failure threshold is reached.

Check the Pod’s restart count:

kubectl get pods -n probe-labCode language: JavaScript (javascript)

You can inspect the individual container status:

kubectl get pod -n probe-lab -l app=probe-demo \
  -o jsonpath='{.items[0].status.containerStatuses[0].restartCount}'Code language: JavaScript (javascript)

Inspect recent events:

kubectl describe pod -n probe-lab -l app=probe-demo

After the restart, the application performs its simulated 20-second startup again.

The startup probe protects it while it initializes. Once startup succeeds, the other probes resume.

What this experiment proves: A liveness failure can restart the container, and a startup probe can protect the restarted application during initialization.

The failure marker is deliberately limited to three requests. This prevents the lab from repeatedly triggering liveness failures after recovery.

12. Failure Injection 3: Misconfigure the Startup Probe

Now test what happens when the startup allowance is too short.

The application needs approximately 20 seconds to initialize.

Its current startup configuration allows 12 failures at five-second intervals. That provides a roughly 60-second failure window.

For this experiment, reduce the threshold to two.

Run this patch:

kubectl patch deployment probe-demo \
  -n probe-lab \
  --type='json' \
  -p='[{"op":"replace","path":"/spec/template/spec/containers/0/startupProbe/failureThreshold","value":2}]'Code language: JavaScript (javascript)

This creates a new Deployment revision.

Watch the Pods:

kubectl get pods -n probe-lab -wCode language: JavaScript (javascript)

The startup probe will fail before the application completes its simulated initialization.

Kubernetes will restart the container after the configured number of consecutive startup failures.

The new container must start its initialization again. It may repeatedly restart while the incorrect threshold remains in place.

This demonstrates why startup thresholds must reflect the application’s actual initialization time.

Restore the correct threshold

Return the startup threshold to 12:

kubectl patch deployment probe-demo \
  -n probe-lab \
  --type='json' \
  -p='[{"op":"replace","path":"/spec/template/spec/containers/0/startupProbe/failureThreshold","value":12}]'Code language: JavaScript (javascript)

Watch the rollout:

kubectl get pods -n probe-lab -wCode language: JavaScript (javascript)

When the updated Deployment starts, allow the application to initialize.

Inspect the final state:

kubectl get deployment,pods -n probe-labCode language: JavaScript (javascript)

What this experiment proves: A startup probe must allow enough time for normal initialization. An overly strict threshold can cause repeated restarts even when the application would eventually become healthy.

13. Troubleshoot Failed Kubernetes Probes

When a Pod does not become ready or repeatedly restarts, do not immediately change the threshold.

First identify which probe failed and why.

Useful commands

Check Pod status:

kubectl get pods -n probe-lab -o wideCode language: JavaScript (javascript)

Describe the Pod:

kubectl describe pod -n probe-lab -l app=probe-demo

Review current logs:

kubectl logs -n probe-lab deployment/probe-demo

Review logs from a previous container instance:

kubectl logs -n probe-lab \
  -l app=probe-demo \
  --previous

Check recent namespace events:

kubectl get events -n probe-lab \
  --sort-by=.metadata.creationTimestampCode language: JavaScript (javascript)

Inspect endpoint readiness:

kubectl get endpointslices \
  -n probe-lab \
  -l kubernetes.io/service-name=probe-demoCode language: JavaScript (javascript)

Interpret common symptoms

SymptomPossible causeWhat to inspect
Pod is Running but not ReadyReadiness check failingProbe path, HTTP status, dependencies, EndpointSlice
Container restarts repeatedlyLiveness or startup failure, process crash, or other terminationPod events, restart count, current and previous logs
Startup probe keeps failingStartup threshold is too short, endpoint is wrong, or application never initializesStartup endpoint, container logs, initialization time
Readiness changes repeatedlyUnstable readiness condition or threshold too sensitiveDependency health, application latency, probe frequency
Probe times outEndpoint is slow or resource constrainedCPU, memory, application latency, timeout value
Service does not send traffic to a PodEndpoint is not ready or Service selector is incorrectEndpointSlice conditions, Pod labels, Service selector

The messages in kubectl describe pod are especially important. They help distinguish failed probes from image errors, container crashes, scheduling issues, and other causes.

14. Production Probe Design Recommendations

The lab demonstrates probe mechanics. Production configuration needs more careful design.

Keep health endpoints lightweight

A probe should not perform expensive operations.

Avoid triggering a complete database scan or lengthy business transaction for every health request.

The endpoint should return a clear result quickly.

Separate process health from traffic readiness

Use separate endpoints when the conditions are different.

For example:

  • /startupz checks application initialization.
  • /livez checks whether the process can still make progress.
  • /readyz checks whether the application can serve the required workload.

A single endpoint may be suitable for multiple probes in simple applications, but separate endpoints make the intended behaviour clearer.

Avoid dependency-driven restart loops.

A temporary database or API outage should not automatically restart every application container.

Use readiness for conditions that prevent correct request handling. Use liveness for failures that genuinely require process recovery.

Size startup allowance from evidence

Measure the application’s startup time under realistic conditions.

Include slow nodes, cold caches, model loading, configuration retrieval, and expected initialization work.

Set the startup failure window to cover realistic startup variation, not just the fastest observed startup.

Test probes under resource pressure

A probe can fail because the application is overloaded.

Test normal CPU and memory usage, but also run controlled load tests in a separate environment.

Monitor whether short timeouts produce false restarts.

Protect sensitive health endpoints

Probe endpoints should reveal only the minimum information required.

Do not expose secrets, environment variables, internal credentials, or detailed dependency information in their responses.

Review probe behaviour after deployments

Application startup behaviour can change after code or configuration changes.

Check probe success, restart counts, readiness transitions, and execution latency after releases.

A previously suitable probe threshold may no longer fit a larger application or a new initialization step.

15. Failure-Injection Test Matrix

Use this matrix when testing the same workload in a staging cluster.

TestInjected conditionExpected resultEvidence to collect
Normal startupStandard initializationPod becomes readyStartup success, zero restarts
Slow startupDelayed initializationStartup probe allows timeStartup events, restart count
Readiness failureApplication cannot accept trafficPod becomes unready; container continuesPod condition, EndpointSlice
Readiness recoveryApplication becomes available againPod returns to ReadySuccessful readiness event
Liveness failureApplication cannot make progressContainer restartsRestart count, events
Startup misconfigurationThreshold too shortRepeated startup restartsStartup events, previous logs
Dependency failureRequired dependency unavailableReadiness reflects serving abilityDependency metrics, Pod readiness
Recovery after restartApplication initializes againPod returns to ReadyStartup success, ready condition

Record the Kubernetes version, image version, probe settings, test time, and observed result.

This makes the test repeatable and helps identify changes between application releases.

16. Clean Up the Lab

After completing the exercises, delete the test namespace:

kubectl delete namespace probe-labCode language: JavaScript (javascript)

This removes the lab Deployment, Service, ConfigMap, and temporary resources.

Always verify the namespace is gone:

kubectl get namespacesCode language: JavaScript (javascript)

Do not leave failure-injection resources running in a shared cluster.

Frequently Asked Questions

What is the main difference between readiness and liveness probes?

Readiness checks whether an application can receive traffic. Liveness checks whether the container should be restarted. A readiness failure does not directly restart the container.

Does a readiness probe restart a Pod?

No. A failed readiness probe marks the Pod as not ready for normal Service traffic. The container continues running while Kubernetes keeps checking it.

What happens when a liveness probe fails?

After the configured number of consecutive failures, the kubelet terminates the container. The container is then handled according to the Pod’s restart policy.

Why do I need a startup probe?

A startup probe gives a slow-starting application time to initialize. Liveness and readiness checks do not begin until startup succeeds.

Can I use all three probes together?

Yes. This is a common design for applications that require startup time and also need separate runtime health and traffic-readiness checks.

Does a TCP probe prove that the application works?

No. It proves that a TCP connection can be opened. It does not prove that the application can complete a real request.

What should I use for a Kubernetes web application?

An HTTP probe is often a good choice when the application exposes lightweight, reliable health endpoints. Select separate paths for startup, liveness, and readiness where their conditions differ.

Why does my Pod restart even though the application works locally?

The probe may use the wrong path or port. It may time out, depend on an unavailable service, or use an unsuitable threshold. Inspect events, logs, and the probe configuration before changing it.

Final Thoughts

Readiness, liveness, and startup probes solve three different Kubernetes problems.

Readiness controls traffic eligibility. Liveness provides a recovery mechanism for an unhealthy process. Startup protects applications that need extra initialization time.

The most reliable way to understand them is to test each behaviour separately.

Use an isolated namespace. Inject one failure at a time. Inspect Pod conditions, EndpointSlices, events, and restart counts. Then restore normal behaviour and verify recovery.

A good probe configuration should help an application recover without causing unnecessary restarts or sending traffic to an instance that cannot serve it.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x