# Guided Exercise: Applying the Framework to a Broken Service, on Paper First Before the `endpoint-fix-task` Lab, walk through the framework yourself against a described symptom — no cluster needed yet. ## The scenario A teammate says: "`my-svc` isn't routing any traffic to our Pods, and I don't know why — the Pods look healthy in `kubectl get pods`." ## Your task Write out, step by step, what you would actually DO for each framework stage, before looking at the worked answer: 1. **Observe** — what's the precise, specific symptom here (not "it's broken")? 2. **Gather Evidence** — name the exact `kubectl` commands you'd run, in order, and what each one is checking for. 3. **Form Hypothesis** — based on what ROOT 07's Services lesson taught you, what's the most likely cause of "Pods healthy, but Service routes nowhere"? 4. **Test** — how would you CONFIRM that hypothesis before changing anything? 5. **Repair** — what's the minimal fix, assuming your hypothesis is correct? 6. **Validate** — what would you check afterward to PROVE the fix worked, not just assume it? ## A worked answer to check yourself against 1. Traffic sent to `my-svc` never reaches any Pod, despite the Pods themselves reporting `Running`/`Ready` — this rules out "the Pods are unhealthy" as the cause. 2. `kubectl get endpoints my-svc` (does it show any Pod IPs at all?), then `kubectl describe service my-svc` (what selector is it actually using?), then `kubectl get pods --show-labels` (what labels do the real Pods actually carry?). 3. A Service-to-Pod label selector mismatch — exactly the failure mode ROOT 07's demonstration walked through, where a Service's selector no longer matches the Pods' actual labels. 4. Directly compare the Service's selector (from `describe service`) against the Pods' labels (from `get pods --show-labels`) side by side — confirmed if they genuinely don't match. 5. Correct the Service's selector (or the Pods' labels, whichever is actually wrong) so they match again. 6. `kubectl get endpoints my-svc` now shows the Pod IPs populated — not just "the YAML looks right now," but the actual Endpoints object reflecting real, matched Pods. ## Instructor Notes **Facilitation:** This exercise deliberately reuses ROOT 07's own content — a good moment to point out explicitly that the framework's value is applying PRIOR knowledge systematically, not learning something entirely new each time. **Approximate timing:** 10-12 minutes live with discussion; 10 minutes self-paced. **Optional extension:** ask what would change about steps 2-4 if the symptom were instead "Pods healthy, but ONE specific caller can't reach the Service while others can" — a good bridge to considering NetworkPolicy (ROOT 09) as an alternative hypothesis once the simpler selector-mismatch explanation is ruled out.