Files
rootnode-academy/scenarios/data/rootnode-probe-port-mismatch.json
ced4568andClaude Sonnet 5 60fbf0c385 feat(curriculum): add RootNode learning path, student roster, and scenario isolation metadata
Pre-Phase-1 platform work, approved and tested earlier but not yet committed:

- Terminal banner: "RootNode Academy Lab — node: k8s-lab", upstream KubeKosh
  attribution left untouched in footer/README/LICENSE.
- RootNode curriculum mode: scenarios/rootnode-path.json (Foundation -> Workloads
  -> Networking -> Configuration -> Troubleshooting -> Real Ops -> Capstone),
  built from existing scenario content grouped by category, no new scenarios
  invented. New GET /api/curriculum/path endpoint.
- Student roster + per-student progress: instructor-roster, pick-your-name login
  (no password), students/environments-adjacent progress table migrated to a
  (student_id, scenario_id) composite key so practice progress and exam sessions
  are isolated per student instead of one global bucket. New /api/roster,
  /api/login endpoints.
- scenarios/data/*.json: added isolation_type metadata (shared_namespace vs
  ephemeral_cluster) from an audit of which scenarios execute cluster-scoped or
  node-level commands. This was Tier-1-isolation groundwork that got superseded
  same-day by the full-ephemeral-per-student architecture (see
  docs/LAB_ARCHITECTURE.md) — the field is kept as descriptive metadata only,
  per the note now in scenarios/SCHEMA.md. Not wasted: it's an accurate audit of
  which scenarios touch cluster-scoped resources, useful independent of isolation
  model.
- .gitignore added (node_modules/, frontend/dist/, *.db, /data/, .env) — none
  existed before; without it, npm installs during testing would have landed in
  a commit.

Known limitation still open: no frontend UI for any of this yet (login screen,
roster-add form, curriculum view) — API-only. No auth on the roster-add endpoint.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-18 01:21:16 -05:00

65 lines
3.7 KiB
JSON

{
"id": "rootnode-probe-port-mismatch",
"title": "Stuck Not-Ready: The Probe Port Mismatch",
"category": "Observability & Ops",
"isolation_type": "shared_namespace",
"difficulty": "Medium",
"type": "task",
"weight": 8,
"description": "## Stuck Not-Ready: The Probe Port Mismatch\n\nA deployment named `api-gateway` was rolled out to the `default` namespace. The pods start, the container runs — but the deployment never reaches Ready. Traffic won't be routed to it, and the on-call alert is firing.\n\nThis is a class of incident that is easy to miss: the container is actually healthy, but Kubernetes disagrees because the readiness probe is checking the **wrong port**. In production this pattern silently blocks rollouts, causes zero-downtime deploys to stall, and is tricky to diagnose if you go straight to logs instead of reading events.\n\n**Your task:** Diagnose why the pods are failing their readiness check, correct the probe configuration, and restore the deployment to **2/2 Ready**.\n\n> Tip: start with pod status and events — the scheduler and kubelet leave a clear trail. Read before you patch.",
"hints": [
{
"title": "1. See the failure",
"body": "List pods and look at the READY column. Then describe one of the failing pods and read the Events section at the bottom — kubelet reports readiness probe failures there with the exact port it tried.",
"command": "kubectl get pods\nkubectl describe pod -l app=api-gateway"
},
{
"title": "2. Inspect the probe config",
"body": "Pull the readiness probe definition from the live deployment. You are looking for the httpGet port — compare it to the port nginx actually listens on (80).",
"command": "kubectl get deployment api-gateway -o jsonpath='{.spec.template.spec.containers[0].readinessProbe}'"
},
{
"title": "3. Patch the probe port",
"body": "Use a JSON patch to correct the readiness probe port to 80. The deployment will trigger a new rollout and the pods should become Ready within a few seconds.",
"command": "kubectl patch deployment api-gateway --type='json' -p='[{\"op\":\"replace\",\"path\":\"/spec/template/spec/containers/0/readinessProbe/httpGet/port\",\"value\":80}]'"
}
],
"setup_commands": [
{
"command": "kubectl create deployment api-gateway --image=nginx:1.25 --replicas=2"
},
{
"command": "kubectl patch deployment api-gateway --type='json' -p='[{\"op\":\"add\",\"path\":\"/spec/template/spec/containers/0/readinessProbe\",\"value\":{\"httpGet\":{\"path\":\"/\",\"port\":8080},\"initialDelaySeconds\":3,\"periodSeconds\":5}}]'"
}
],
"validation": {
"description": "Checks that the probe port is corrected and both replicas are Ready.",
"commands": [
{
"description": "Readiness probe port is 80",
"command": "kubectl get deployment api-gateway -o jsonpath='{.spec.template.spec.containers[0].readinessProbe.httpGet.port}'",
"expected_output": "80",
"match": "exact"
},
{
"description": "Deployment has 2 ready replicas",
"command": "kubectl get deployment api-gateway -o jsonpath='{.status.readyReplicas}' 2>/dev/null | grep -v '^$' || echo 0",
"expected_output": "2",
"match": "exact"
},
{
"description": "No pods stuck in non-Running state",
"command": "kubectl get pods -l app=api-gateway --no-headers 2>/dev/null | awk '{print $3}' | grep -cv 'Running' || true",
"expected_output": "0",
"match": "exact"
}
]
},
"default_namespace": "default",
"teardown_commands": [
{
"command": "kubectl delete deployment api-gateway --ignore-not-found"
}
]
}