Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are deploying a stateful microservice on Google Kubernetes Engine (GKE) behind a Kubernetes Service. During testing, you observe three distinct container behaviors that must be managed across the Pod lifecycle:
Which probe configuration should you implement in your Pod specification?
This configuration correctly uses a startup probe for the 90-second initialization window, but it reverses the core responsibilities of liveness and readiness probes regarding container restarts and Service traffic orchestration.
livenessProbe fails during the 20-second backup routine, kubelet interprets the container as unhealthy and restarts the container, interrupting the active backup and risking data corruption or CrashLoopBackOff events.readinessProbe updates the Pod's Ready condition to False and removes the Pod from Service endpoints, but it never restarts the container. A deadlocked process would remain stuck indefinitely, never recovering on its own.kubelet when failure thresholds are exceeded; they do not gracefully drain or pause Service traffic on their own.The roles of the readinessProbe and livenessProbe were swapped so that readiness controlled Service endpoint removal during backups and liveness triggered container restarts on deadlocks.
Kubernetes provides three specialized health checks—startup, readiness, and liveness probes—that work together to manage container lifecycles, orchestrate GKE Service traffic flow, and enable self-healing restarts.
startupProbe runs exclusively when the container first boots. While it is running, Kubernetes disables both liveness and readiness checks, preventing kubelet from prematurely killing the container during the 90-second disk load.readinessProbe controls whether a Pod is marked Ready and included in Service endpoints or load balancer backends. When the 20-second backup begins and the readiness check fails, GKE stops sending new requests to the Pod without terminating or restarting it. Once the backup completes and the probe succeeds again, traffic resumes automatically.livenessProbe detects unrecoverable runtime failures such as deadlocks. When consecutive failures exceed failureThreshold, kubelet terminates and restarts the container according to the Pod's restartPolicy.startupProbe handles the 90-second boot window, the livenessProbe can use short periodSeconds and failureThreshold values for rapid runtime recovery.readinessProbe cleanly removes the Pod from Service routing while keeping the container alive.Assigning each lifecycle phase to its dedicated probe avoids trade-offs between slow startup tolerance and fast failure detection, while ensuring planned maintenance pauses traffic instead of triggering disruptive container restarts.
This configuration uses a liveness probe for both runtime traffic control and deadlock recovery while mistakenly assuming a readiness probe can suppress container restarts during startup.
readinessProbe with a high failureThreshold only delays marking the Pod Ready for Service traffic; it does not disable or delay the livenessProbe. Consequently, kubelet will still run the livenessProbe during the 90-second disk load and repeatedly restart the container before initialization finishes.livenessProbe during the 20-second backup routine instructs kubelet to kill and restart the container instead of leaving it running while temporarily pausing incoming Service requests.kubelet to restart the container and can push the Pod into a CrashLoopBackOff loop with exponential backoff delays.kubelet from terminating a container whose livenessProbe has failed.A startupProbe were used to protect the 90-second initialization window and a readinessProbe were used to pause traffic during the 20-second backup routine, leaving the livenessProbe solely for deadlocks.
This configuration attempts to rely on initialDelaySeconds in a liveness probe to protect a slow-starting container while misusing a startup probe to manage runtime Service traffic routing.
startupProbe does not manage Service endpoints during runtime maintenance. Instead, it runs only at container initialization; if a startupProbe fails beyond its threshold, Kubernetes assumes the container failed to start and restarts the container rather than temporarily pausing traffic.initialDelaySeconds of 90 seconds on a livenessProbe delays deadlock detection for every subsequent restart by at least 90 seconds, even if a container boots faster in some cases or takes slightly longer under heavy disk I/O.readinessProbe, Kubernetes assumes the Pod can accept traffic as soon as the container starts, risking dropped client requests during both the 90-second initialization and the 20-second backup routine.CrashLoopBackOff state, rather than graceful endpoint removal.It cannot be correct for runtime traffic draining because a startupProbe never runs after initial boot and cannot remove a running Pod from a Service without restarting it.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated