Validate Deployment, Service & Ingress YAML Before kubectl apply
Catch subtle YAML indentation errors, forbidden tab characters, deprecated API versions, selector label mismatches, and multi-port naming violations directly inside your browser. No manifest data or tokens are transmitted to any server.
Kubernetes YAML Validation Guide & Common Pitfalls
1. Indentation & Tabs
YAML specifications strictly prohibit tab characters (\t) for indentation. A single tab will cause error: error unmarshaling JSON. Always use 2 standard spaces.
2. Selector Label Mismatch
In apps/v1, every label defined in spec.selector.matchLabels must exist in spec.template.metadata.labels with identical values. Otherwise, the Deployment controller cannot identify Pods.
3. Ingress pathType & Ports
In networking.k8s.io/v1, pathType is required (Exact or Prefix). Legacy serviceName is replaced by nested service: { name, port: { number } }.