Files
rootnode-academy/scenarios/data/namespaces-basics.json
T
Abhinav Sinha 124e5276d4 refactor(scenarios): split monolithic configuration into individual files
- 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]>
2026-06-15 07:52:47 +05:30

57 lines
2.2 KiB
JSON

{
"id": "namespaces-basics",
"title": "Working with Namespaces",
"category": "Core Concepts",
"difficulty": "Easy",
"type": "task",
"weight": 4,
"description": "## Working with Namespaces\n\nNamespaces provide a mechanism for isolating groups of resources within a single cluster.\n\n**Your task:**\n\n1. Create a namespace called `team-alpha`\n2. Deploy a `nginx:alpine` Deployment named `web` with **2 replicas** inside the `team-alpha` namespace\n\n**Verify your work:**\n```bash\nkubectl get namespace team-alpha\nkubectl get deployment web -n team-alpha\n```",
"hints": [
{
"title": "Create a namespace",
"body": "Use `kubectl create namespace <name>` to create a new namespace.",
"command": "kubectl create namespace team-alpha"
},
{
"title": "Deploy into a specific namespace",
"body": "Use the `-n` or `--namespace` flag with `kubectl create deployment`. Alternatively use `kubectl apply -f` with `namespace` set in the manifest metadata.",
"command": "kubectl create deployment web --image=nginx:alpine --replicas=2 -n team-alpha"
}
],
"setup_commands": [],
"validation": {
"commands": [
{
"description": "Namespace 'team-alpha' exists",
"command": "kubectl get namespace team-alpha -o jsonpath='{.metadata.name}'",
"expected_output": "team-alpha",
"match": "exact"
},
{
"description": "Deployment 'web' exists in team-alpha",
"command": "kubectl get deployment web -n team-alpha -o jsonpath='{.metadata.name}'",
"expected_output": "web",
"match": "exact"
},
{
"description": "Deployment 'web' has 2 replicas",
"command": "kubectl get deployment web -n team-alpha -o jsonpath='{.spec.replicas}'",
"expected_output": "2",
"match": "exact"
},
{
"description": "Deployment uses nginx image",
"command": "kubectl get deployment web -n team-alpha -o jsonpath='{.spec.template.spec.containers[0].image}'",
"expected_output": "nginx",
"match": "contains"
}
]
},
"default_namespace": "default",
"teardown_commands": [
{
"command": "kubectl delete namespace team-alpha --ignore-not-found --wait=false"
}
]
}