Kubernetes 1.37 (“Garhwal”) just made KYAML Stable. YAML with a K bolted on, and it’s a genuinely useful feature.
The problem
YAML has two well known landmines.
Type coercion.
country: NO # becomes boolean false
enabled: yes # becomes boolean true
version: 3.10 # becomes float 3.1
Those values were meant to be strings. YAML quietly turned them into something else.
Whitespace as structure. Indentation defines meaning in normal YAML. Get one space wrong and the file still parses. It just means something else now, silently.
spec:
containers:
- name: app
image: nginx
ports:
- containerPort: 80
protocol: TCP # one space off, this attaches to the wrong container
No error. No warning. Just wrong.
Helm makes this worse, since you’re injecting indentation from outside the YAML context and hoping it lines up.
What KYAML actually changes
Nothing about the language. It’s YAML’s existing “flow style,” just enforced. Every KYAML file is valid YAML. Old tooling, old parsers, old kubectl versions all read it fine.
Three rules: objects use { }, arrays use [ ], strings are always quoted. Numbers and booleans stay bare, since they’re actually meant to be those types.
One example, everything at once:
# before
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
spec:
replicas: 2
template:
spec:
automountServiceAccountToken: false
hostNetwork: true
containers:
- name: app
image: nginx
ports:
- containerPort: 8080
env:
- name: REGION
value: NO
# after (KYAML)
apiVersion: "apps/v1"
kind: "Deployment"
metadata: { name: "api" }
spec: {
replicas: 2,
template: {
spec: {
automountServiceAccountToken: false,
hostNetwork: true,
containers: [
{
name: "app",
image: "nginx",
ports: [{ containerPort: 8080 }],
env: [{ name: "REGION", value: "NO" }],
},
],
},
},
}
Everything in one shot:
{ }for objects (metadata,spec, each container)[ ]for arrays (containers,ports,env)- strings always quoted (
"api","nginx","REGION") replicas: 2andcontainerPort: 8080stay bare, they’re real numbersautomountServiceAccountToken: falseandhostNetwork: truestay bare, they’re real booleansvalue: "NO"is quoted, because it’s a string that would otherwise get read asfalse
KYAML doesn’t remove types, it just stops guessing which one you meant.
Why it matters
Since structure comes from { } and [ ], not from spaces, indentation stops being load bearing. Squash a KYAML file onto one line and it means exactly the same thing. That kills the Helm whitespace problem outright.
Trying it
kubectl get deployment api -o kyaml
Convert existing files:
go install github.com/google/yamlfmt/cmd/yamlfmt@latest
yamlfmt --kyaml manifest.yaml
Also ships as a pre-commit hook and a Docker image for CI.
Nothing forces the switch. Plain YAML keeps working. Mixed repos, some converted, some not, are fine.
My plan if I touch this on a real repo: one directory first, verify round-trip parsing, check Helm and Kustomize don’t reformat it differently, then expand once it’s boring.
Not required. Cheap upgrade. Worth exploring.
For a broader breakdown of what else landed in this release, check out my notes on Kubernetes v1.37: An Operator’s Look at Garhwal.