kubernetes-validate
validates kubernetes resource definitions against schemas
What it is and what it does
kubernetes-validate is a schema validator for Kubernetes resource definitions. It takes manifests and checks them against official Kubernetes JSON schemas, catching type mismatches, missing required fields, and (optionally) unexpected properties. The package includes pre-built schemas for multiple Kubernetes versions, reducing library size by including only .0 patch versions per release.
You can use it as a command-line tool to validate files before deployment, or import it as a Python library to integrate validation into automation scripts, CI/CD pipelines, or deployment tooling. It supports both permissive and strict validation modes, and lets you target specific Kubernetes versions (defaulting to the version of kubernetes-validate itself).
Use it for:
- Validate Kubernetes manifests in CI/CD pipelines before applying them to clusters.
- Catch configuration errors in resource definitions during development or code review.
- Enforce strict schema compliance by rejecting manifests with unknown or extra properties.
- Validate manifests against a specific Kubernetes version to catch API compatibility issues.
- Integrate validation into deployment automation to prevent invalid resources from being submitted.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates Kubernetes resource definitions against official Kubernetes JSON schemas, reporting schema mismatches and type errors.
Yes. The package is actively maintained, has no known vulnerabilities, installs cleanly with minimal dependencies, and solves a concrete problem for anyone managing Kubernetes infrastructure. Use it if you validate Kubernetes manifests in automation or want to catch configuration errors early.
Install
kubernetes-validate on PyPI
pip
pip install kubernetes-validateuv
uv add kubernetes-validatepoetry
poetry add kubernetes-validateInstalling kubernetes-validate
Before you install
Low install friction with a pure-Python wheel and six stable runtime dependencies. Last release 88 days ago; repository is active and not archived.
License in practice
Licensed under Apache (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install kubernetes-validate
from kubernetes_validate import validate
data = {'apiVersion': 'v1', 'kind': 'Pod', 'metadata': {'name': 'test'}}
validate(data, '1.22', strict=True)
Requires Python >=3.7.
Verify before relying
- Whether the embedded Kubernetes schemas cover all API versions and custom resource definitions in your environment.
- Performance characteristics when validating large numbers of resources or very large manifests.
- Whether strict mode validation aligns with your deployment pipeline's tolerance for unknown fields.
Package facts
| License | Apache (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — PyYAML, jsonschema, typing-extensions, importlib-resources, packaging, referencing |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 136,457/month — #11,395 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: kubernetes_validate-1.36.0-py3-none-any.whl
Keywords: kubernetes, schema, validate, validator
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
check-jsonschemaA command-line tool and pre-commit hook that…
permissive · top 5,000 on PyPI
kcidb-iokcidb-io validates and manipulates Linux Kernel…
copyleft · top 15,000 on PyPI
yamaleYamale validates YAML files against a schema…
permissive · top 5,000 on PyPI
lazr.configlazr.config lets you define configuration…
copyleft · top 15,000 on PyPI
eidoValidates project metadata against PEP schemas…
permissive · top 15,000 on PyPI
lightkube-modelsProvides Python type definitions and model…
permissive · top 15,000 on PyPI
cfgvValidates configuration data against schemas…
permissive · top 1,000 on PyPI
swagger-spec-validatorValidates Swagger/OpenAPI specifications…
permissive · top 15,000 on PyPI
fastjsonschemaValidates JSON data against JSON Schema…
permissive · top 1,000 on PyPI
openapi-schema-validatorValidates data and schemas against OpenAPI…
permissive · top 1,000 on PyPI