Kubernetes YAML Validator Online
Validate Kubernetes YAML against the official schemas of 8 recent versions, flag removed APIs and lint resources, probes, image tags and security.
Result
Press “Run” to see the result.
Send one or more YAML (or JSON) documents as yaml, a file or a raw body; List kinds are expanded. Each object is validated against the OpenAPI schema of the chosen Kubernetes version (the last 8 minor releases, latest patch, default the newest; /v1/k8s-validate/versions lists them) with field types, required fields, enums and — in strict mode (default) — unknown fields such as a misspelled imagePullPolice. null values (e.g. creationTimestamp: null from kubectl) are ignored.
An apiVersion / kind not served by that version is reported as not_served with the release that removed it and the replacement (for example batch/v1beta1 CronJob → batch/v1 since 1.25), or the versions that serve it. Unknown kinds (custom resources) are skipped.
lint (default on) checks workloads (Deployment, StatefulSet, DaemonSet, Job, CronJob, Pod…): image without tag or :latest, missing CPU / memory requests and memory limit, missing readiness / liveness probes, privileged containers, privilege escalation, running as root, hostNetwork / hostPID / hostIPC, hostPath volumes, dangerous capabilities, literal secrets in env, single replica, NodePort services. Schemas come from the Kubernetes OpenAPI spec (Apache-2.0) and are refreshed weekly.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/k8s-validate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"yaml":"apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: web\nspec:\n replicas: 2\n selector: {matchLabels: {app: web}}\n template:\n metadata: {labels: {app: web}}\n spec:\n containers:\n - name: web\n image: nginx:latest\n ports: [{containerPort: \"80\"}]\n---\napiVersion: batch/v1beta1\nkind: CronJob\nmetadata: {name: report}\n","version":"1.37"}'const res = await fetch('https://apibox.io.vn/v1/k8s-validate', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"yaml": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: web\nspec:\n replicas: 2\n selector: {matchLabels: {app: web}}\n template:\n metadata: {labels: {app: web}}\n spec:\n containers:\n - name: web\n image: nginx:latest\n ports: [{containerPort: \"80\"}]\n---\napiVersion: batch/v1beta1\nkind: CronJob\nmetadata: {name: report}\n",
"version": "1.37"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/k8s-validate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"yaml": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: web\nspec:\n replicas: 2\n selector: {matchLabels: {app: web}}\n template:\n metadata: {labels: {app: web}}\n spec:\n containers:\n - name: web\n image: nginx:latest\n ports: [{containerPort: \"80\"}]\n---\napiVersion: batch/v1beta1\nkind: CronJob\nmetadata: {name: report}\n", "version": "1.37"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/k8s-validate');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"yaml":"apiVersion: apps/v1\\nkind: Deployment\\nmetadata:\\n name: web\\nspec:\\n replicas: 2\\n selector: {matchLabels: {app: web}}\\n template:\\n metadata: {labels: {app: web}}\\n spec:\\n containers:\\n - name: web\\n image: nginx:latest\\n ports: [{containerPort: \\"80\\"}]\\n---\\napiVersion: batch/v1beta1\\nkind: CronJob\\nmetadata: {name: report}\\n","version":"1.37"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Does it support CRDs?
Custom resources are reported as skipped; only built-in Kubernetes kinds are validated.
Can I validate Helm charts?
Render them first (helm template) and send the output; templates with {{ }} are not valid YAML.
Is my manifest stored?
No. It is validated in memory; secrets in it are never logged or kept.