CKAD · Question #17
A Deployment named backend-deployment in namespace staging runs a web application on port 8081. The Deployment's manifest files can be found at ~/.spicy-pikachu/backend-deployment.yaml Modify the…
This question tests your ability to configure a Kubernetes readiness probe on an existing Deployment using an HTTP GET check, with specific timing parameters. Readiness probes tell Kubernetes when a container is ready to accept traffic.
Question
~/.spicy-pikachu/backend-deployment.yaml
Modify the Deployment specifying a readiness probe
using path /healthz.
Set initialDelaySeconds to 8 and periodSeconds to 5.Explanation
This question tests your ability to configure a Kubernetes readiness probe on an existing Deployment using an HTTP GET check, with specific timing parameters. Readiness probes tell Kubernetes when a container is ready to accept traffic.
Approach. Edit ~/.spicy-pikachu/backend-deployment.yaml and add a readinessProbe block under the container spec (not at the pod or deployment level). Since the app runs on port 8081 and the path is /healthz, use httpGet with port: 8081 and path: /healthz. Set initialDelaySeconds: 8 (wait 8s after container starts before first probe) and periodSeconds: 5 (probe every 5s thereafter). After editing, apply with: kubectl apply -f ~/.spicy-pikachu/backend-deployment.yaml. The relevant YAML snippet under containers[*] is:
readinessProbe: httpGet: path: /healthz port: 8081 initialDelaySeconds: 8 periodSeconds: 5
Concept tested. Kubernetes readiness probes - specifically configuring an httpGet readiness probe on a Deployment container with correct path, port, initialDelaySeconds, and periodSeconds values, then applying the manifest to a specific namespace.
Topics
Community Discussion
No community discussion yet for this question.