Files
rootnode-academy/scenarios/data/cks-psa-namespace.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

38 lines
1.5 KiB
JSON

{
"id": "cks-psa-namespace",
"title": "Pod Security Admission",
"category": "Cluster Security",
"difficulty": "Easy",
"type": "task",
"weight": 4,
"description": "## Pod Security Admission (PSA)\n\nPod Security Admission replaced PodSecurityPolicies (PSP) to enforce security standards at the namespace level.\n\n**Your task:**\n\nA namespace named `secure-workloads` already exists. Add the necessary label to this namespace to **enforce** the `restricted` pod security standard.\n\n```bash\n# Verify your label:\nkubectl get ns secure-workloads --show-labels\n```",
"hints": [
{
"title": "Namespace Label",
"body": "Label the namespace with the `pod-security.kubernetes.io/enforce=restricted` key-value pair.",
"command": "kubectl label ns secure-workloads pod-security.kubernetes.io/enforce=restricted"
}
],
"setup_commands": [
{
"command": "kubectl create namespace secure-workloads --dry-run=client -o yaml | kubectl apply -f -"
}
],
"validation": {
"commands": [
{
"description": "Namespace secure-workloads is labeled",
"command": "kubectl get ns secure-workloads -o jsonpath='{.metadata.labels.pod-security\\.kubernetes\\.io/enforce}'",
"expected_output": "restricted",
"match": "exact"
}
]
},
"default_namespace": "default",
"teardown_commands": [
{
"command": "kubectl delete namespace secure-workloads --ignore-not-found --wait=false"
}
]
}