YAMLTools logo
Free · no sign-up · in your browser

Kubernetes YAML validator

Paste one or many manifests separated by --- and check them before kubectl apply: structure against the Kubernetes API, objects that do not match each other and the settings that put a cluster at risk.

Kubernetes
YAML
Loading editor…

Paste a file on the left to validate it.

CREA.MBA
CREA.MBA

Ship your next product faster with AI-ready Next.js

The boilerplate designed for AI to understand your project. Use code YAMLTOOLS for 5% off!

Start Building
Ad

What YAMLTools checks in your Kubernetes file

  • Each object against the schema of its apiVersion and kind: unknown fields, wrong types and missing required fields.
  • Deployments whose selector does not match the labels of their Pod template.
  • Services whose selector matches no Pod in the file, and targetPort values that no container exposes.
  • Ingress rules pointing to Services or ports that are not defined.
  • ConfigMaps and Secrets referenced by a Pod but missing from the manifests.

Risks it flags

  • Privileged containers, running as root and allowPrivilegeEscalation left on.
  • Passwords and tokens written as plain env values instead of Secrets.
  • Images on :latest or without a tag.
  • Containers without CPU and memory requests or limits.
  • Workloads without readiness or liveness probes.

Common Kubernetes errors

The ones that break a deploy most often, and how YAMLTools reports them.

Selector does not match the template labels

selector:
  matchLabels: {app: api}
template:
  metadata:
    labels: {app: backend}

The API server rejects the Deployment. YAMLTools shows both sides so you can see which label differs.

Service targetPort that no container listens on

targetPort: 8080
# containerPort: 3000

The Service is created but traffic never reaches the Pod. These are the bugs that take an afternoon to find.

Field in the wrong place

spec:
  containers: [...]   # in a Deployment

containers belongs under spec.template.spec. The schema check names the field and where it should go.

Your file stays on your computer

Validation, risk analysis, diagram and conversions run in your browser. Nothing is uploaded unless you decide to save it with an account.

Kubernetes validator FAQ

Manifests, multiple documents and what happens with your file.