back to labs
Kubernetes: A Stable Address for Moving Pods
MediumDevOps15-20 minThe brief
A Deployment's Pods (in /root/case/deployment.yaml for reference) keep getting replaced with new IPs, so clients can't target them directly. Write a Service manifest at /root/case/service.yaml that gives them one stable virtual IP and DNS name. Read /root/case/assignment.env for the app label (APP) the Service must select and the service port (PORT) it must expose. The Service needs kind: Service, a selector matching the Pods' app label, and that port. Grading reads the manifest YAML.
What you'll do
- Declare a Service (kind: Service)
- Select the Pods by their app label (spec.selector)
- Expose the assigned service port
Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.
