skillfed

kubernetes-validate

validates kubernetes resource definitions against schemas

kubernetes-validate v1.36.0 136.5K downloads/30d#11,395 on PyPI51
Permissive license Apache Active released

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-validate

uv

uv add kubernetes-validate

poetry

poetry add kubernetes-validate

Installing 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

kubernetes yaml validationk8s resource schema validatorkubernetes manifest validatorvalidate kubernetes definitionsk8s schema compliance checkerkubernetes config validator
kubernetesschema-validationdevops

More Quality Assurance packages