How to fix Startup probe failed: HTTP probe failed with statuscode: 500 in Kubernetes

KubernetesINTERMEDIATEHIGHUpdated Dec 6, 2025· 170 views

A container fails startup probe checks repeatedly, causing it to restart continuously (CrashLoopBackOff). Startup probes verify the application has started before liveness and readiness probes begin. Fix by increasing failureThreshold, adjusting periodSeconds, or ensuring the health endpoint is accessible during startup.

Quick fix

Fixes Startup probe failed: HTTP probe failed with statuscode: 500

kubectl get pod <pod-name> -n <namespace>
kubectl describe pod <pod-name> -n <namespace>
  1. Check pod status and restart history
  2. Review startup probe configuration
  3. Increase failureThreshold
  4. Adjust periodSeconds for faster checks
kubernetes — error
kubectl get pod <pod-name> -n <namespace>
kubectl describe pod <pod-name> -n <namespace>
Startup probe failed: HTTP probe failed with statuscode: 500

What this error means

A startup probe verifies that an application inside a container has started. It runs only at pod startup and blocks liveness and readiness probes from running until it succeeds. If the startup probe fails repeatedly (based on failureThreshold), kubelet restarts the container. Startup probes are designed for slow-starting applications (database migrations, cache warming, large initialization). Without startup probes, liveness probes may kill containers before they finish starting. The total startup window is failureThreshold × periodSeconds.

Typical symptoms

  • Pod enters CrashLoopBackOff state immediately
  • Container keeps restarting without reaching Running state
  • Events show "Startup probe failed"
  • Container logs indicate application still initializing when probe runs
  • Pod eventually becomes healthy if given more time but killed before reaching it
  • Azure Kubernetes Service or other cloud deployments showing repeated restarts

Common causes

  1. failureThreshold × periodSeconds too short for application startup
  2. Probe endpoint not available during initialization
  3. Wrong port, path, or protocol in probe configuration
  4. Application requires time for database migrations, dependency loading
  5. Resource constraints (CPU/memory) slowing startup
  6. External dependencies (database, cache) unavailable at startup

How to fix "Startup probe failed: HTTP probe failed with statuscode: 500"

1Check pod status and restart history

View repeated restarts:

bash
kubectl get pod <pod-name> -n <namespace>
kubectl describe pod <pod-name> -n <namespace>

Expect high restart count and reason "Unhealthy".

2Review startup probe configuration

Check the probe settings:

bash
kubectl get pod <pod-name> -n <namespace> -o yaml | grep -A10 startupProbe

Note failureThreshold and periodSeconds.

3Increase failureThreshold

Allow more time for startup:

yaml
startupProbe:
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 30
  periodSeconds: 10
  failureThreshold: 30  # ~300 seconds total = 30 * 10s

For slow apps (Java with migrations): use failureThreshold: 60-90.

4Adjust periodSeconds for faster checks

Check more frequently if needed:

yaml
startupProbe:
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 30
  periodSeconds: 5  # Check every 5 seconds instead of 10
  failureThreshold: 60  # 300 seconds = 60 * 5s
5Verify probe endpoint is accessible

Test manually if possible:

bash
kubectl logs <pod-name> -n <namespace>
grep -i health /var/log/app.log  # Check app logs for endpoint startup

Endpoint may not be listening immediately.

6Use TCP socket probe if HTTP not available

TCP probes are simpler for startup:

yaml
startupProbe:
  tcpSocket:
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 5
  failureThreshold: 30

This just checks if port is listening, doesn't require HTTP endpoint.

7Check application logs for startup delays

Identify why startup is slow:

bash
kubectl logs <pod-name> -n <namespace> | grep -i "starting|initializing|migration|timeout"

Database migrations and dependency initialization often cause delays.

8Allocate more resources if constrained

Resource starvation slows startup:

yaml
resources:
  requests:
    cpu: 500m
    memory: 512Mi
  limits:
    cpu: 1000m
    memory: 1Gi

Check actual usage:

bash
kubectl top pod <pod-name> -n <namespace>

Advanced notes

Total startup window = failureThreshold × periodSeconds. For 5-minute startup, use failureThreshold: 30, periodSeconds: 10. Startup probes block liveness and readiness probes; once startup succeeds, those take over. For slow-starting apps (Java, Python with heavy initialization), startup probes are essential to prevent premature container kills. Use TCP socket probes for connectivity checks (faster, no HTTP overhead). HTTP probes require application to expose health endpoint during startup. Startup probes with liveness and readiness create three independent checks, each with different failure thresholds. Monitor container startup time in logs to tune failureThreshold appropriately. For cloud deployments, check cloud platform documentation for default timeouts that may override your configuration.

Frequently asked questions

What does "Startup probe failed: HTTP probe failed with statuscode: 500" mean?
A startup probe verifies that an application inside a container has started. It runs only at pod startup and blocks liveness and readiness probes from running until it succeeds. If the startup probe fails repeatedly (based on failureThreshold), kubelet restarts the container.
How do I fix "Startup probe failed: HTTP probe failed with statuscode: 500"?
A container fails startup probe checks repeatedly, causing it to restart continuously (CrashLoopBackOff). Startup probes verify the application has started before liveness and readiness probes begin. Fix by increasing failureThreshold, adjusting periodSeconds, or ensuring the health endpoint is accessible during startup.
What causes "Startup probe failed: HTTP probe failed with statuscode: 500"?
failureThreshold × periodSeconds too short for application startup Probe endpoint not available during initialization Wrong port, path, or protocol in probe configuration
Is the "Startup probe failed: HTTP probe failed with statuscode: 500" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading