k8s-yaml-validator

Validate Kubernetes manifests through linting, schema checks, CRD detection, and cluster dry-run.

Updated May 22, 2026
One-click install
npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill k8s-yaml-validator-viniciuscs84
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-yaml-validator
Source: https://github.com/viniciuscs84/sdd-toolkit/tree/main/skills/k8s-yaml-validator
Command: npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill k8s-yaml-validator-viniciuscs84

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Kubernetes manifests often fail at deploy time due to syntax errors, schema violations, or admission controller rejections that are only discovered after applying them to a cluster. This Skill runs a multi-stage validation pipeline that catches these issues before deployment and produces a report-only summary with suggested fixes. ## Core Features & Use Cases - Multi-Stage Validation: Runs yamllint for syntax, kubeconform for schema validation, and kubectl server-side dry-run for admission controller checks, with deterministic stage gates and fallbacks when tools are missing. - CRD Detection and Documentation Lookup: Detects Custom Resource Definitions in manifests and looks up their spec requirements via Context7 MCP or web search, since CRD schemas are not covered by standard validators. - Report-Only Output: Generates a structured report with severity tables, file-absolute line numbers, before/after fix suggestions, and next steps, without ever modifying user files. - Use Case: Before deploying a multi-document YAML containing a Deployment, Service, and cert-manager Certificate, run this Skill to catch a string-typed containerPort, detect the CRD, and confirm the manifest passes a server-side dry-run. ## Quick Start Ask the AI to validate your Kubernetes manifest file, for example: validate the file manifests/deployment.yaml and report all errors before I deploy it.

Frequently Asked Questions about k8s-yaml-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Kubernetes YAML files before deploying?

Run a staged validation pipeline: yamllint for syntax and style, kubeconform for schema validation against Kubernetes and CRD schemas, and kubectl apply --dry-run=server for admission controller checks. This Skill orchestrates all stages and reports every issue with line numbers.

How to validate Kubernetes CRD manifests when schemas are missing?

Detect the CRD's kind, group, and version first, then look up its documentation via Context7 MCP or web search to learn required spec fields. kubeconform can also pull schemas from the datreeio CRDs-catalog, and missing schemas are skipped with -ignore-missing-schemas.

What is the difference between kubeconform and kubectl dry-run validation?

kubeconform validates manifests against static JSON schemas offline, catching type errors and unknown fields. kubectl server-side dry-run validates against the live cluster, catching admission webhook rejections, policy violations, and quota issues that schema checks cannot detect.

Does this validation work without cluster access?

Yes, yamllint and kubeconform run fully offline. Without cluster access, server-side dry-run fails and a parse-only client-side fallback with --dry-run=client --validate=false is attempted, with the limitation documented in the report.

Why does kubeconform not report line numbers for schema errors?

kubeconform reports schema errors as JSON paths, not line numbers, and parse errors as document-relative lines. Convert parse errors to file-absolute lines using the document start line, and locate schema errors by searching the YAML for the field name in the JSON path.

Can this tool automatically fix my Kubernetes YAML errors?

No, it is strictly report-only and never modifies files. It presents before/after code blocks as suggestions with severity and complexity indicators, and you decide which fixes to apply manually.