KubernetesJunior

Pod runs but ignores part of your YAML

A misspelled key in a Pod spec is silently dropped, so the pod runs without it. Validate the manifest and diff it against what the API server stored.

What you see

  • The pod is Running but does not do what the manifest says, for example the command or an environment variable is missing

What it means

If a key in your YAML is misspelled, such as commnd instead of command, it is ignored instead of rejected. The pod is created without that setting and nothing tells you.

How to confirm the cause

  1. 1
    Delete the pod and recreate it with validation on
    kubectl apply --validate -f mypod.yaml

    Example from the official docs

    I0805 10:43:25.129850   46757 schema.go:126] unknown field: commnd

    The unknown field is reported. The docs note this message may occasionally be a false alarm.

  2. 2
    Compare your file with what the API server stored
    kubectl get pods/mypod -o yaml > mypod-on-apiserver.yaml

    Extra lines on the server version are normal. Lines that are in your file but missing on the server point to a problem in your spec.

Causes and fixes

  • Misspelled or misplaced key

    HOW TO TELL
    --validate prints unknown field, or a line of your YAML is missing from the stored object.
    FIX
    Correct the spelling and the indentation, then apply again.

How to stop it coming back

  • Run kubectl apply --validate (or a schema linter such as kubeconform) in CI before anything reaches the cluster.
  • Keep manifests small enough to read in a review.

Keep going

Sources

Kubernetes documentation (kubernetes.io), read 18 Nov 2026. The docs version selector listed v1.33 to v1.37.

Search

Search cheat sheets and projects