- Split `scenarios/scenarios.json` into individual JSON files under `scenarios/data/` named `<scenario-id>.json` - Split `scenarios/bundles.json` into individual JSON files under `scenarios/bundles/` named `<bundle-id>.json` - Updated `backend/server.js` to dynamically load scenario and bundle files from their respective directories - Updated documentation in `scenarios/SCHEMA.md` and `README.md` to reflect the new repository layout and contributor workflow Signed-off-by: Abhinav Sinha <[email protected]>
38 lines
1.3 KiB
JSON
38 lines
1.3 KiB
JSON
{
|
|
"id": "pod-labeling-basics",
|
|
"title": "Labelling Resources",
|
|
"category": "Core Concepts",
|
|
"difficulty": "Easy",
|
|
"type": "task",
|
|
"weight": 3,
|
|
"description": "## Labelling Resources\n\nLabels are key-value pairs attached to objects, used to organize and select subsets of objects. A pod named `app-worker` is currently running, but it's missing a required label.\n\n**Your task:**\n\nAdd the label `tier=frontend` to the existing pod `app-worker`.\n\n```bash\n# Verify labels\nkubectl get pod app-worker --show-labels\n```",
|
|
"hints": [
|
|
{
|
|
"title": "Use kubectl label",
|
|
"body": "You can label resources imperatively without editing the YAML.",
|
|
"command": "kubectl label pod app-worker tier=frontend"
|
|
}
|
|
],
|
|
"setup_commands": [
|
|
{
|
|
"command": "kubectl run app-worker --image=nginx:alpine"
|
|
}
|
|
],
|
|
"validation": {
|
|
"commands": [
|
|
{
|
|
"description": "Pod has label tier=frontend",
|
|
"command": "kubectl get pod app-worker -o jsonpath='{.metadata.labels.tier}'",
|
|
"expected_output": "frontend",
|
|
"match": "exact"
|
|
}
|
|
]
|
|
},
|
|
"default_namespace": "default",
|
|
"teardown_commands": [
|
|
{
|
|
"command": "kubectl delete pod app-worker --ignore-not-found --grace-period=0 --force"
|
|
}
|
|
]
|
|
}
|