Files
rootnode-academy/scenarios/data/priority-class-task.json
T
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

67 lines
3.2 KiB
JSON

{
"id": "priority-class-task",
"title": "Pod Priority and PriorityClass",
"category": "Workloads & Scheduling",
"isolation_type": "shared_namespace",
"difficulty": "Medium",
"type": "task",
"weight": 6,
"description": "## Pod Priority and PriorityClass\n\n**PriorityClasses** assign a numeric priority to pods. When cluster resources are scarce, the scheduler preempts lower-priority pods to make room for higher-priority ones. This is a CKA exam topic.\n\n**Your task:**\n\n1. Create a **PriorityClass** named `high-priority` with:\n - `value: 1000000`\n - `globalDefault: false`\n - `description: \"High priority workloads\"`\n2. Create a Pod named `critical-pod` using `nginx:alpine` that references the `high-priority` PriorityClass via `spec.priorityClassName`\n\n```bash\n# Verify:\nkubectl get priorityclass high-priority\nkubectl get pod critical-pod -o jsonpath='{.spec.priorityClassName}'\n```",
"hints": [
{
"title": "Create the PriorityClass",
"body": "PriorityClass is a cluster-scoped resource (not namespaced). Higher value = higher priority.",
"command": "cat <<EOF | kubectl apply -f -\napiVersion: scheduling.k8s.io/v1\nkind: PriorityClass\nmetadata:\n name: high-priority\nvalue: 1000000\nglobalDefault: false\ndescription: \"High priority workloads\"\nEOF"
},
{
"title": "Reference PriorityClass in a Pod",
"body": "Set `spec.priorityClassName` in the pod spec to the name of your PriorityClass.",
"command": "cat <<EOF | kubectl apply -f -\napiVersion: v1\nkind: Pod\nmetadata:\n name: critical-pod\nspec:\n priorityClassName: high-priority\n containers:\n - name: app\n image: nginx:alpine\nEOF"
}
],
"setup_commands": [],
"validation": {
"commands": [
{
"description": "PriorityClass 'high-priority' exists",
"command": "kubectl get priorityclass high-priority -o jsonpath='{.metadata.name}'",
"expected_output": "high-priority",
"match": "exact"
},
{
"description": "PriorityClass value is 1000000",
"command": "kubectl get priorityclass high-priority -o jsonpath='{.value}'",
"expected_output": "1000000",
"match": "exact"
},
{
"description": "globalDefault value is false",
"command": "kubectl get priorityclass high-priority -o jsonpath='{.globalDefault}' | grep -v '^$' || echo false",
"expected_output": "false",
"match": "exact"
},
{
"description": "Pod 'critical-pod' uses high-priority PriorityClass",
"command": "kubectl get pod critical-pod -o jsonpath='{.spec.priorityClassName}'",
"expected_output": "high-priority",
"match": "exact"
},
{
"description": "Pod 'critical-pod' is Running",
"command": "kubectl get pod critical-pod -o jsonpath='{.status.phase}'",
"expected_output": "Running",
"match": "exact"
}
]
},
"default_namespace": "default",
"teardown_commands": [
{
"command": "kubectl delete pod critical-pod --ignore-not-found --grace-period=0 --force"
},
{
"command": "kubectl delete priorityclass high-priority --ignore-not-found"
}
]
}