Kubernetes YAML
Direct answer
Kubernetes configuration is expressed as YAML. Keep indentation consistent, validate before apply/deploy, and use ecosystem-specific dry-run tools plus a general YAML syntax checker.
Typical snippet
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
spec:
replicas: 2
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
image: example/web:1.0Validation tips
Validate with kubectl apply --dry-run=client and the YAML.cc syntax checker before apply.
Related
Common YAML pitfalls here
- Indentation mistakes under nested
spec/stepskeys. - Unquoted values that become booleans in some parsers.
- Copy-pasting tabs from chat or docs sites.
After editing, validate syntax on YAML.cc, then run the ecosystem-native checker.