til
til copied to clipboard
Lint your manifests
YAML is a tricky format. We use yamllint, because it supports multi-documents in a single file.
You can also use Kubernetes-specifics linters:
- kube-score lints your manifests and enforce good practices.
- kubeval also lints the manifests, but only checks validity.
In Kubernetes 1.13, the --dry-run option appeared on kubectl which lets Kubernetes check your manifests without applying them. You can use this feature to check if your YAML files are valid for Kubernetes.
https://www.algolia.com/blog/engineering/8-algolia-tested-best-practices-kubernetes/