Files
rootnode-academy/scenarios/data/expose-service-basics.json
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

53 lines
1.8 KiB
JSON

{
"id": "expose-service-basics",
"title": "Exposing an Application",
"category": "Services & Networking",
"difficulty": "Easy",
"type": "task",
"weight": 4,
"description": "## Exposing an Application\n\nA `redis` deployment is running, but other pods cannot reliably connect to it because pod IPs change when they restart.\n\n**Your task:**\n\nCreate a **ClusterIP** Service named `redis-svc` to expose the `redis` deployment on port `6379`.\n\n```bash\n# Verify your service:\nkubectl get svc redis-svc\n```",
"hints": [
{
"title": "Use kubectl expose",
"body": "The imperative `expose` command is the fastest way to create a service for a deployment.",
"command": "kubectl expose deployment redis --name=redis-svc --port=6379 --target-port=6379"
}
],
"setup_commands": [
{
"command": "kubectl create deployment redis --image=redis:alpine"
}
],
"validation": {
"commands": [
{
"description": "Service 'redis-svc' exists",
"command": "kubectl get svc redis-svc -o jsonpath='{.metadata.name}'",
"expected_output": "redis-svc",
"match": "exact"
},
{
"description": "Service targets port 6379",
"command": "kubectl get svc redis-svc -o jsonpath='{.spec.ports[0].port}'",
"expected_output": "6379",
"match": "exact"
},
{
"description": "Service selector matches deployment",
"command": "kubectl get svc redis-svc -o jsonpath='{.spec.selector.app}'",
"expected_output": "redis",
"match": "exact"
}
]
},
"default_namespace": "default",
"teardown_commands": [
{
"command": "kubectl delete deployment redis --ignore-not-found"
},
{
"command": "kubectl delete svc redis-svc --ignore-not-found"
}
]
}