Inspiration
Let's take an example of a some developers that made some rectification to K8s configurations files, to deploy their objects, and they push their configuration file on git repository. Now assume that what happens if there is a failure in production.? This will be difficult to handle the all such errors. To answer all such questions , a Datree enters.
What it does?
A Datree is a CLI tool that supports Kubernetes and help the developers to prevent from making errors. Or we can say that It is a prevention tool that prevents Kubernetes Misconfigurations before to their Production. It contains different Categories of Policies like Containers, Workload, CronJob, Network, and Custom to check different policies.
How we get installed in our System?
To get Started with datree.io, firstly we need to Install Datree's CLI integration. To do that we have to open Command Line Interface(Windows Poer Shell) and type a simple command to install it: "iwr -useb https://get.datree.io/windows_install.ps1 | iex"
Then Run Datree to test it against a pre-compiled demo file - k8s-demo.yaml
"datree.exe test $env:USERPROFILE.datree\k8s-demo.yaml"
Then Sign in to configure your policy .
Challenges that we faced during creation of own Policy.
Datree also performs schema validation checks for your files before running the policy checks, If your have build your Policy, make sure to check that it will pass the Schema Validation check. For example If I make an error in the structure of my YAML file and run a Datree check on it, it's going to give an error into it.
Accomplishments that we're proud of
Finally, Containers_best_practices Policy check. These Container state is reported by Kubernetes to check containers image state label during of the process of running the container .
It helps to easily identify the Containers state label and verify the correct state and have a valid state.
What we learned
I had learnt so about i) Reading and writing JSON and YAML. ii) Schema and JSON Validation checks iii) Create our own Policy. iv) How Datree helps to prevents Kubernetes Misconfigurations before to their Production using their Custom Policy checks.
Built With
- datree
- json
- yaml
Log in or sign up for Devpost to join the conversation.