YAML drills
Kubernetes, CI, and Compose all speak YAML — indentation is structure, and the type traps are real.
Your text is parsed with js-yaml (loaded once from a CDN) — a real YAML parser. If it parses, we check the resulting structure and types. Watch the indentation and the string-vs-boolean traps.
📄
YAML
0/6 doneKubernetes, CI, and Compose all speak YAML — indentation is structure, and the type traps are real.
1. Your first YAMLWrite YAML with three keys:easy2. A YAML listWrite a YAML mapping with a key "ports" whose value is a list of three numbers: 80, 443, 8080. Use the block (dash) style.easy3. Nested maps by indentationWrite YAML for a container: image is nginx:1.27, and a nested "resources" map with cpu "500m" and memory "256Mi".medium4. Quote to keep it a string (type trap)YAML infers types, and that bites. Make both of these STRINGS:hard5. A multi-line block scalarWrite YAML with a key "script" whose value is a literal block (using |) containing exactly these two lines:medium6. A minimal Kubernetes PodWrite a minimal Kubernetes Pod manifest:hard