# http: HTTP probe failed with statuscode: 503

- **ID:** `kubernetes/kubelet-http-healthz-fail`
- **Domain:** kubernetes
- **Category:** runtime_error
- **Error Code:** `K8S-HTTP-503`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The application's HTTP health endpoint returned a 503 status, usually because the app is not ready to serve traffic or is overloaded.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| kubernetes 1.22 | active | — | — |
| kubernetes 1.23 | active | — | — |
| kubernetes 1.27 | active | — | — |
| kubernetes 1.28 | active | — | — |

## Workarounds

1. **Check the application logs for errors during startup or dependency failures. For example, run `kubectl logs <pod-name> -c <container>` and look for stack traces.** (90% success)
   ```
   Check the application logs for errors during startup or dependency failures. For example, run `kubectl logs <pod-name> -c <container>` and look for stack traces.
   ```
2. **Ensure the health endpoint returns 200 only when all dependencies (database, cache) are ready. Use a startup probe with a longer initial delay if the app takes time to initialize.** (80% success)
   ```
   Ensure the health endpoint returns 200 only when all dependencies (database, cache) are ready. Use a startup probe with a longer initial delay if the app takes time to initialize.
   ```

## Dead Ends

- **Increase the liveness probe threshold without fixing the app.** — This only masks the problem; the app remains unhealthy and may crash later. (70% fail)
- **Remove the readiness probe entirely.** — Removing the readiness probe can cause traffic to be routed to unhealthy pods, leading to user-facing errors. (85% fail)
