DevOps

How to Lint a Kubernetes Manifest

Use the Kubernetes Linter to validate manifest YAML for required fields and best-practice warnings before deploying.

Tool Used

Kubernetes Linter

Open tool
1

Paste your manifest YAML

Paste your Kubernetes manifest into the textarea. Multiple documents separated by --- are supported, so you can lint an entire manifest file at once.

2

Identify the resource kind

The linter detects the kind field (Deployment, Service, ConfigMap, etc.) and applies the relevant checks for that resource type automatically.

3

Fix errors for missing required fields

Red error items flag missing required fields like apiVersion, kind, and metadata.name. A manifest missing any of these will be rejected by the Kubernetes API server.

4

Address best-practice warnings

Yellow warnings highlight issues that will not immediately break a deploy but cause problems in production: add CPU and memory resource limits to containers, and avoid the :latest image tag which prevents reliable rollbacks.

5

Add metadata.namespace

If no namespace is specified, resources deploy to the default namespace — a common mistake in production clusters. Add metadata.namespace to ensure resources land in the correct environment.

All done!

You are ready to use Kubernetes Linter like a pro.

Try it now
All guides