Datree: To Prevent K8s Misconfigurations from Reaching Production.

Already, feels great

What is Datree?

It is an open-source CLI utility tool that prevents misconfiguration on Kubernetes workloads and a SaaS platform to manage policies. It validates your Kubernetes YAML files.

Why do we need Datree?

To prevent errors in Kubernetes configurations. It helps the owners/developers to manage the policy enforcement which, automatically checks for rules violations. When using Datree, you do not need to have a connection with the production cluster. Policy and rules can be applied from the online Datree Dashboard. Interesting isn’t it?

How do Datree works?

  1. Checks the Yaml file for the syntax is written correctly.
  2. Kubernetes schema validation checks if the version is valid or invalid.
  3. Policy check — It could be a memory limit, CPU limit, or any custom policy check.
  4. It gives the summary of the YAML file run against Datree applied policies.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
$ datree test deployment.yaml
Configuration Error
Dashboard Link
Dashboard to config datree rules
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
resources:
limits:
memory: 200Mi
cpu: 1

requests:
memory: 100Mi
cpu: 100m

ports:
- containerPort: 80
$ datree test deployment.yaml
Solved 4 config rules

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nilima Chavan

Nilima Chavan

Student | Kubernetes 1.23 release team | Jr. Research Engineer