strict decoding error: unknown field "spec.template.spec.containers[0].ports[0].protocl"
The manifest contains a field the API schema doesn’t know — a typo, wrong indentation, or a field from another API version.
Seen on:
Kubernetes
Meaning
Since Kubernetes 1.25 server-side field validation rejects unknown fields (older clients said “error validating data: ValidationError … unknown field”). Most often a key is indented one level too deep or shallow, so it lands in the wrong object.
Common causes
- Typo in a key name
- Wrong indentation putting a key under the wrong parent
- Field from a newer/older API version
- Helm template rendering a value at the wrong level
⚡ Quick fix
- Check the field path in the message
- kubectl explain <kind>.<path> to see valid fields
- Validate locally with kubectl apply --dry-run=server
Detailed fix by platform
Kubernetes
- bash
kubectl explain deployment.spec.template.spec.containers.ports kubectl apply --dry-run=server -f deploy.yaml
How to diagnose
- Path — Exact field path reported
- Indentation — Parent key in the YAML
- Version — apiVersion in use
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Kubernetes
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026