Prevent Kubernetes misconfigurations from reaching production (again 😤 )! The CLI integration provides a policy enforcement solution to run automatic checks for rule violations.
Datree can be used on the command line to run policies against Kubernetes manifests YAML files. The end goal is to include Datree's policy check as part of your CI/CD pipeline or to run it locally before every commit.
Binary releases can be downloaded from the releases page or can be installed directly:
Run Datree to test it against a pre-compiled demo file - k8s-demo.yaml:
You will get the following output in your CLI:
Each CLI invocation is running a default policy that includes 21 built-in rules. To configure the policy, you will need to sign up by clicking on the link at the bottom of the execution output:
This link will lead to a sign-up page. To make it easier for you, so you will not need to create a new user, you can sign up with your private GitHub account.
After sign-up, you'll be automatically redirected to your centralized policy to set it according to your needs.
Your policy is now ready, and you can start running it to test your own Kubernetes manifests files.