k8wiz
Kubernetes
Hard
Troubleshooting

A slow-starting application is killed by its liveness probe before it finishes starting. What is the recommended fix?

Select your answer:

Show answer and explanation

Answer: Add a startupProbe that covers the slow start

Explanation

While a startupProbe is defined and hasn't succeeded yet, the kubelet doesn't run the liveness or readiness probes. Set failureThreshold times periodSeconds long enough to cover the slowest startup. After it succeeds, the liveness probe can stay strict for the rest of the container's life. A large initialDelaySeconds also works, but it delays failure detection on every start.