
Kubernetes: Validate Deployment, Service and Ingress YAML Online
Deployment, Service, Ingress: structurally validate Kubernetes YAML before `kubectl apply` — browser-local check, no cluster or kubectl required.
Validating Kubernetes YAML before `kubectl apply`
A typo in apiVersion, a Deployment without spec.selector.matchLabels, or an Ingress missing pathType often surfaces only after you push, when CI, a teammate, or the API server rejects the manifest. FastMinify does not run kubectl, does not talk to a cluster, and is not kubeconform. The Kubernetes YAML validator runs structural checks in the browser: Layer A (apiVersion, kind, metadata) plus kind-specific rules for Deployment, Service, Ingress, and more. Pair it with the Kubernetes manifest formatter for readable multi-document YAML. The full cluster lives on the Kubernetes tools hub, sibling to the DevOps hub for Compose, Terraform, and Dockerfile.
Common errors and pre-apply workflow
A few mistakes show up constantly in pasted manifests, Helm output, and tutorial snippets.
A Kubernetes rollout rarely ships alone. Validate manifests, then lint the image build and the IaC that provisions the cluster.
Validate vs format vs kubeconform vs kubectl
Browser validation, formatting, OpenAPI schema tools, and cluster dry-runs answer different questions. Mixing them up produces a green check here and a red CI job later.
Tool / layer
What it proves
A simple sequence catches most typos before anything touches a cluster.
When the browser tool is enough
You do not need a cluster or kubeconfig to catch three structural errors on a manifest from a ticket.
Limits of the browser tool and what it does not replace
You still need CLI tools and the apiserver once you require OpenAPI schema validation against a specific Kubernetes version, CRD schemas, or admission webhook policies.
The validator reads only the pasted YAML. It does not resolve Helm charts or expand Kustomize overlays. It does not check that a Service name referenced by an Ingress exists in another document either.
CLI and ecosystem
kubeconform, kubectl, and yamllint remain the standard in CI. FastMinify complements exploration and one-shots.
kubeconform
Validates manifests against Kubernetes OpenAPI schemas (version-pinned).
Pros:
Cons:
kubectl apply --dry-run=client
Client-side dry-run using local schema validation (kubectl version dependent).
Pros:
Cons:
yamllint
Generic YAML linter for indentation and style.
Pros:
Cons:
Common manifests such as Deployment, Service, and Ingress
Every manifest is a YAML mapping with apiVersion, kind, and metadata (name or generateName). FastMinify checks that pairing. For example, Deployment expects apps/v1, Service expects v1, and Ingress expects networking.k8s.io/v1. Deprecated API groups such as extensions/v1beta1 trigger a warning, not a hard block.
A Deployment needs a non-empty spec.selector.matchLabels, a non-empty spec.template.spec.containers array, and a name and image on each container. FastMinify also checks that spec.selector.matchLabels values match spec.template.metadata.labels. This is a classic copy-paste mistake that passes YAML lint but breaks at runtime.
Before
After
A Service must declare a non-empty spec.ports array, and each port needs port as a number or an IntOrString string. An Ingress on networking.k8s.io/v1 needs spec.rules with http.paths. Each path requires path, pathType (Prefix, Exact, or ImplementationSpecific), and backend.service.name plus backend.service.port.number or port.name.
A concrete workflow to format, validate, and generate
Open the validate Kubernetes tool, paste or upload a .yaml or .yml file (max 512 KiB), and wait for the short debounce delay (~300 ms). The results panel lists issues by level (error, warning, info) with path, an optional docIndex for multi-document files, and a line when available. A result of Valid with warnings still shows issues, so read the warnings before you merge.
The format Kubernetes tool rewrites multi-document manifests with js-yaml and a 2 or 4 space indent. Paste, upload, or load the sample, and it formats automatically. After a manual edit, use the Format button (⌘↵). YAML # comments are dropped on the round-trip, so copy them first if you rely on them.
You upgrade from networking.k8s.io/v1beta1 to v1. The YAML still parses, but every path needs an explicit pathType. The validator flags invalid_path_type before you waste a pipeline step on kubectl apply.
Conclusion
Validating Kubernetes manifest structure before kubectl apply avoids wasted CI minutes on typos you could catch in the browser. Use FastMinify as a fast structural filter: format for readability, then validate for GVK and kind rules. Add kubeconform or a cluster dry-run when schema truth matters. Continue on the Kubernetes hub for generators and Helm values, and on the DevOps hub for Compose and Terraform.
Validate your Kubernetes YAML now
Related Articles

HTTP/2 and HTTP/3 change how files travel, not how big they are. Measured sizes, compile times and bundling tests show what minification still saves.

Convert a Unix epoch to a readable date and back, tell seconds from milliseconds, and avoid time zone, JWT and clock change traps, all in your browser.

Read a cron expression field by field, check its next runs in UTC or local time and avoid traps with steps, time zones and dialects, all in your browser.