A GKE pod loads a large in-memory cache during startup, which takes about two minutes. Until the cache is ready the pod must receive no traffic, but Kubernetes must not restart it while it warms up. Which probe fits?
Show answer and explanation
Answer: C
A readiness probe controls whether a pod receives traffic through its Service endpoints. Failing it while the cache loads keeps the pod out of rotation without killing the container, and once the probe passes the pod joins the endpoints. Liveness probes handle restarts, while disruption budgets and grace periods govern voluntary evictions and shutdown rather than startup readiness.
Why the other options are wrong
- A. A liveness probe restarts the container when it fails, so a slow warm-up would trigger repeated restarts and the cache would never finish loading.
- B. A disruption budget limits voluntary evictions during maintenance and does nothing to route traffic away from a pod that is still starting.
- D. The termination grace period only applies when a pod is shutting down, so extending it does nothing to hold traffic back during startup.