Founding prices until 15 December: 30% off Pro, locked for life. See pricing

Kubernetes YAML checker

Paste one or more manifests. It runs in your browser; nothing is sent anywhere.

2 objects: Deployment/web, Service/web

4 errors2 warnings0 tips

  • Line 9, Deployment/webselector app: web doesn't match the template's labels (app: website). kubectl apply rejects this.
  • Line 19, Deployment/webcontainerPort must be a number, not "80".
  • Line 22, Deployment/webmemory "256m" means millibytes. You probably meant 256Mi.
  • Line 34, Service/webnodePort 8080 is outside the default range 30000-32767.
  • Line 17, Deployment/webImage "nginx" has no fixed tag (it means :latest), so what runs can change without anyone deploying. Pin a version.
  • Document 2, Service/webThe selector (app: web) matches no Pod template in this file, so the Service may get no endpoints.

Checked in your browser; your YAML isn't sent anywhere. It covers common mistakes, not every field of every resource.

Questions

How do I validate Kubernetes YAML without a cluster?
Paste it here for the common mistakes, or run kubectl apply --dry-run=client -f file.yaml (needs kubectl). kubectl apply --dry-run=server also checks admission rules, but needs a cluster.
Why does my Service have no endpoints?
Its selector doesn't match the Pods' labels, or the Pods aren't ready. This checker flags a Service whose selector matches no Pod template in the same file.
What is the right apiVersion for a Deployment?
apps/v1. extensions/v1beta1 and apps/v1beta2 were removed in Kubernetes 1.16.
Is 512m memory 512 megabytes?
No. In Kubernetes, m means milli, so 512m is half a byte. Write 512Mi (mebibytes) or 512M (megabytes).

Practise it on a real machine

Broken systems in your browser. The grader checks the result.