
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.
Why validate 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 (Compose, Terraform, 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: what the browser does not replace
As soon as you need OpenAPI schema validation against a specific Kubernetes version, CRD schemas, or admission webhook policies, CLI tools and the apiserver remain mandatory.
The validator reads only the pasted YAML. It does not resolve Helm charts, does not expand Kustomize overlays, and does not validate that a Service name referenced by an Ingress actually exists in another document.
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: 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, Ingress expects networking.k8s.io/v1. Deprecated API groups such as extensions/v1beta1 trigger a warning — not a hard block.
A Deployment needs spec.selector.matchLabels (non-empty), spec.template.spec.containers (non-empty array), and each container needs name and image. FastMinify also checks that spec.selector.matchLabels values match spec.template.metadata.labels — 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; each port needs port (number or IntOrString string). An Ingress (networking.k8s.io/v1) needs spec.rules with http.paths, each path requiring path, pathType (Prefix, Exact, or ImplementationSpecific), and backend.service.name plus backend.service.port.number or port.name.
Format, validate, generate: a concrete workflow
Open the validate Kubernetes tool, paste or upload a .yaml / .yml file (max 512 KiB), and wait for debounce (~300 ms). The results panel lists issues by level (error, warning, info) with path, optional docIndex for multi-doc files, and a line when available. Valid with warnings still shows issues — read warnings before you merge.
The format Kubernetes tool pretty-prints multi-document manifests via js-yaml (indent 2 or 4 spaces). Paste, upload, or sample: auto-format; after a manual edit, use the Format button (⌘↵). YAML # comments are dropped on the round-trip — 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 for a fast structural filter — format for readability, validate for GVK and kind rules — then kubeconform or cluster dry-run when schema truth matters. Continue on the Kubernetes hub for generators, Helm values, and the DevOps cluster for Compose and Terraform.
Related Articles

A tour of FastMinify clusters, search intents and workflows — minify, DevOps, API and SVG tools, all in the browser, no account required.

Unreadable traces, missing maps: recover readable JS and CSS in the browser with unminify and beautify — formatting only, mangled names stay lost.

Unserialize WordPress `wp_postmeta`, PHP sessions and Laravel caches to readable JSON in the browser — arrays and scalars only, no local script.