Add Readiness and Liveness Probes
The reviews Deployment in namespace catalogs has no health checks. During the last release, users hit Pods that were still warming up, and a Pod that hung overnight kept running until someone restarted it by hand. The application listens on port 8080 (named http).
app container of Deployment reviews has a readiness probe: an HTTP GET on path /ready, port 8080, every 10 seconds.8080 that starts after 30 seconds and fails the container after 3 failed attempts.reviews is updated and available, and the image and replica count stay as they are.A practice cluster is running on this machine: start with kubectl get deploy reviews -n catalogs -o yaml.
About this machine
Ubuntu 24.04 with a private practice cluster: a real Kubernetes API server, scheduler and controllers, and three nodes (controlplane, node01, node02). Containers run in a lightweight runtime: their commands, kubectl logs, exec and run -it work, and Pods reach Services by name with wget or curl. Images never download, and port-forward isn't available. k is an alias for kubectl, with completion. The grader checks the cluster's final state, not the commands you typed.
Part of Prepare for the CKAD. Next step: Fix a Deployment Stuck Pulling Its Image
Teaching or writing about this? Embed this lab on your page
Your machine is ready to start
A fresh machine with its own Kubernetes cluster starts in about half a minute, with the task already set up.
No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.