Kubernetes Manifest Linter
Validate your Kubernetes manifest files to catch common issues before deployment.
Paste a Kubernetes manifest and click "Lint Manifest" to see validation results
About Kubernetes Manifest Linting
Kubernetes manifest files define the desired state of your Kubernetes resources. Linting these files before deploying them can help catch issues early and prevent problems in your cluster.
Common Kubernetes Manifest Issues
- Missing required fields like apiVersion, kind, or metadata
- Invalid resource names (exceeding length limits or using invalid characters)
- Inconsistent indentation or YAML syntax errors
- Security risks like using latest tags, hostNetwork, or privileged containers
- Resource misconfigurations, such as insufficient requests and limits
Best Practices for Kubernetes Manifests
- Always specify resource requests and limits for containers
- Use specific version tags for container images instead of 'latest'
- Add labels and annotations for better organization and filtering
- Configure health checks (liveness and readiness probes)
- Follow the principle of least privilege for security settings
- Use namespaces to organize resources and control access
Kubernetes Schema Validation
This linter performs basic validation, but for a more comprehensive check, consider using tools like:
kubectl
with--validate=true
flag- Kubernetes validation webhook servers
- kubeval, kube-score, or other dedicated manifest validation tools
- CI/CD pipelines with Kubernetes manifest validation steps
Pro Tip
Use Helm or Kustomize to template your Kubernetes manifests, which helps maintain consistency across different environments and reduces the chance of configuration errors.