Kubernetes YAML Formatter
Validate structural K8s manifests (apiVersion, kind, metadata).
A first look at a Kubernetes manifest
Every Kubernetes resource starts with the same handful of top-level fields. When you are pasting YAML from a wiki, a chat thread or a Helm template output, the quickest question is whether the basics are there at all. This tool highlights the key sections of a manifest and tells you whether apiVersion, kind and metadata were found.
Checking a manifest
- Paste the YAML into the Input Data box. The Sample button inserts a small Deployment (nginx-deployment with three replicas) so you can see the output style.
- Click Process / Generate.
- In the result panel, the top-level keys apiVersion, kind, metadata and spec are shown in bold pink and every name: entry in bold blue.
- Read the status line. A green message means all three required fields were found; a red one says some are missing.
- Use Copy or Download to save the text as result.txt, or Clear to begin again.
What is and is not checked
The presence test is a plain text search for the strings apiVersion:, kind: and metadata: anywhere in your input. It does not rewrite indentation, reorder keys or fix spacing, so despite the name the visible text is your original YAML with colour applied. It does not confirm that the YAML is syntactically valid, that the apiVersion matches the kind, or that spec contains the right fields for that resource.
Situations where this is handy
- Spotting a copy-paste that dropped the metadata block before running kubectl apply.
- Finding the resource name and kind quickly in a long manifest.
- Checking that a snippet from documentation is a full resource and not just a fragment.
- Explaining a manifest's structure to a newcomer using the highlighted sections.
Tips and edge cases
- Multi-document files separated by three dashes are treated as one block, so the check passes if each field appears at least once anywhere in the file.
- Because matching is substring-based, a field mentioned inside a comment or a nested key such as a label named kind would also count.
- For real schema validation, use kubectl with a dry-run flag or a tool like kubeconform against your cluster version.
The highlighting and check run as JavaScript in the page itself.
Related Articles
Related Tools