# strict decoding error: unknown field "spec.template.spec.containers[0].ports[0].protocl"

**Code:** `unknown field` · **Category:** Kubernetes · **Seen on:** Kubernetes

The manifest contains a field the API schema doesn’t know — a typo, wrong indentation, or a field from another API version.

## 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

1. Check the field path in the message
2. kubectl explain <kind>.<path> to see valid fields
3. Validate locally with kubectl apply --dry-run=server

## Detailed fix by platform

### Kubernetes

1. 

```bash
kubectl explain deployment.spec.template.spec.containers.ports
kubectl apply --dry-run=server -f deploy.yaml
```


## How to diagnose

1. **Path** — Exact field path reported
2. **Indentation** — Parent key in the YAML
3. **Version** — apiVersion in use

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/kubernetes/unknown-field)
