Skip to content
This repository has been archived by the owner on Oct 3, 2020. It is now read-only.

hjacobs/kube-manifest-lint

Repository files navigation

Kubernetes Manifest Linter

Build Status PyPI PyPI - Python Version License

Validate Kubernetes YAML manifests against JSON schema. It will use the Kubernetes v1.17 schemas for validation by default.

Usage:

pip3 install kube-manifest-lint
kube-manifest-lint my-deployment.yaml

Pre Commit Hook

You can use this tool as a pre-commit in your git repository. Example .pre-commit-config.yaml:

repos:
  - repo: https://codeberg.org/hjacobs/kube-manifest-lint
    rev: "0.2.0"
    hooks:
      - id: kube-manifest-lint

Exit Codes

  • 1: file is not a Kubernetes manifests
  • 2: schema for apiVersion/kind was not found
  • 4: schema is deprecated (e.g. using "extensions/v1beta1" instead of "apps/v1")
  • 8: schema validation failed