0
0
Kubernetesdevops~30 mins

HTTP probe configuration in Kubernetes - Mini Project: Build & Apply

Choose your learning style9 modes available
HTTP Probe Configuration in Kubernetes
📖 Scenario: You are deploying a web application in Kubernetes. To ensure your app is running and healthy, you need to configure an HTTP readiness probe. This probe will check if the app is ready to serve traffic by sending HTTP requests to a specific path.
🎯 Goal: Configure an HTTP readiness probe in a Kubernetes Pod manifest that checks the /health endpoint on port 8080.
📋 What You'll Learn
Create a Pod manifest with a container named webapp using the image nginx:latest.
Add an HTTP readiness probe to the container that sends requests to /health on port 8080.
Set the probe's initial delay to 5 seconds and period to 10 seconds.
Print the final Pod manifest YAML.
💡 Why This Matters
🌍 Real World
HTTP probes help Kubernetes know when your app is ready to receive traffic and when it needs restarting, improving reliability.
💼 Career
Configuring readiness and liveness probes is a common task for DevOps engineers and site reliability engineers managing Kubernetes workloads.
Progress0 / 4 steps
1
Create the basic Pod manifest
Create a Kubernetes Pod manifest named pod.yaml with a spec that includes one container named webapp using the image nginx:latest. Do not add any probes yet.
Kubernetes
Need a hint?

Start with the basic Pod structure and add one container named webapp with the nginx:latest image.

2
Add the HTTP readiness probe configuration
Add a readinessProbe section under the webapp container. Configure it to use an httpGet action that targets path: /health and port: 8080.
Kubernetes
Need a hint?

Use readinessProbe with httpGet specifying the path and port.

3
Set initial delay and period for the readiness probe
Under the readinessProbe, add initialDelaySeconds: 5 and periodSeconds: 10 to control when the probe starts and how often it runs.
Kubernetes
Need a hint?

These settings tell Kubernetes to wait 5 seconds before the first probe and then check every 10 seconds.

4
Print the final Pod manifest
Print the complete Pod manifest YAML to verify your HTTP readiness probe configuration.
Kubernetes
Need a hint?

Use a print statement to output the full YAML manifest as a string.