From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Using probes

Using probes

- So our next task was to create a Namespace with the name probes. And in this Namespace, we run a Pod with the name probepod. It should start the busybox image that runs the command sleep infinity. And the Pod should use a liveness probe that checks the healthz endpoint on the Kubernetes Service. So kubectl get ns, did I already create a Namespace? Let's check on that. I already did, so that's good. And we can continue, and let me do so by running a sample YAML file that I created on beforehand. So what is in the YAML file? Well, the busybox, it command sleep 3,600. And then the readiness probe that uses the command wget, no check certificate --spider on the healthz endpoint. And that should be doing it. So next, we can use kubectl apply -f on healthz probe. And that will create a Pod. So kubectl describe on the Pod readiness exec is showing what? Well, it's showing that the Pod is actually running. And if you check that again after a few seconds, then you can also see the probe. And…

Contents