K8s by Example: Startup Probes
| Startup probes indicate whether the application has started successfully. While the startup probe is running, liveness and readiness probes are disabled. Use for: legacy apps with long initialization, apps that load large datasets at startup, apps with unpredictable startup times. |
| startup-probe-basic.yaml | |
| A startup probe protects slow-starting containers. It checks every 10 seconds for up to 30 attempts (5 minutes total). Once it succeeds, liveness/readiness probes take over. If it fails all attempts, the container is killed. | |
| startup-probe-vs-liveness.yaml | |
| Without startup probe: liveness checks start immediately. If | |
| startup-probe-exec.yaml | |
| Exec startup probes run commands inside the container. Useful for checking if initialization scripts completed, if config files exist, or if database migrations finished. Exit code 0 = success. | |
| startup-probe-tcp.yaml | |
| TCP socket startup probes check if a port is accepting connections. Useful for databases, message brokers, and apps that don’t have HTTP endpoints during startup. Simpler than HTTP for apps that serve TCP protocols. | |
| startup-probe-grpc.yaml | |
| gRPC startup probes use the standard gRPC health checking protocol. The app must implement the | |
| startup-probe-deployment.yaml | |
| During rolling updates, startup probes ensure new Pods are fully initialized before old ones are terminated. Combined with readiness probes, this prevents routing traffic to starting containers. | |
| terminal | |
| Monitor startup probe progress in Pod events. Failed probes show warnings. Once startup succeeds, events stop and liveness/readiness take over. Total startup time = | |