Back to lesson: Expose Apps with the Right Service Type
Free lab · CKAD Prep Program · Module 6: Services and networking
Service discovery
25 min hands-on · Core
Browser Kubernetes (Killercoda 1-node) or Play-with-Kubernetes; no local installs.
Two ways to do this lab: in your browser on Killercoda (free, no install), or on Play-with-Kubernetes as a free practice field. The Killercoda button opens in a new tab; this study page stays here. Killercoda runs one free scenario at a time: if you see a waiting queue, close other Killercoda tabs and wait a minute.
Objectives
- Resolve a Service by DNS name from inside a pod
- Expose the app to the outside with a NodePort and an Ingress rule
- Diagnose an empty-endpoints service in under five minutes
Step 1
Inside view
From a debug pod, resolve the service short name, full FQDN and ClusterIP with nslookup. Record which answers and which would break across namespaces.
Step 2
Outside view
Expose the same app via NodePort and via Ingress. Curl both paths and record the full chain: client to ingress to service to endpoints to pod.
Step 3
Empty endpoints sprint
Break the selector on purpose, diagnose from `kubectl get endpoints` first, fix, and prove with curl. Timed: five minutes, on record.
How to confirm it worked
- DNS answers recorded for all three forms with namespace note
- Both outside paths curl successfully with the chain written down
- Empty-endpoints diagnosis completed inside five minutes