NAME OF THE PROJECT: DEVTOOL API
Video Demo of the project
Using Kubernetes production best policies to run the k8s manifest files through Datree.io to prevent Kubernetes misconfigurations from ever reaching production.
- Clusters are created using Kubernetes in Civo
- DevOps(Configurations, etc)
- Flask API integration
- Python runs Datree commands and POST request to API
- Metrics and logs of the configurations are checked using Grafana (Devtron)
- Notification to the user using Twilio
Pull request to Datree: PRtoDatree
Reference: Kubernetes production best policies
Added next custom policies recommended for production environment✅:
- CUSTOM_CONTAINERS_PODS_MISSING_OWNERS
- CUSTOM_CONTAINERS_MISSING_LIVENESSPROBE
- CUSTOM_CONTAINERS_MISSING_READINESSPROBE
- CUSTOM_CONTAINERS_MISSING_IMAGE_TAG
- CUSTOM_CONTAINERS_MIN_REPLICAS
- CUSTOM_CONTAINERS_MISSING_PODANTIAFFINITY
- CUSTOM_CONTAINERS_RESOURCES_REQUESTS_AND_LIMITS
- CUSTOM_CONTAINERS_RESOURCES_REQUESTS_CPU_BELOW_1000M
- CUSTOM_CONTAINERS_TECHNICAL_LABELS
- CUSTOM_CONTAINERS_BUSINESS_LABELS
- CUSTOM_CONTAINERS_SECURITY_LABELS
- CUSTOM_CONTAINERS_RESTRICT_ALPHA_BETA
Policy type: Containers
- Clone the project:
https://github.com/Snehomoy100/Cloud-Native-Hackathon-2021.git
- Then go to
cd Cloud-Native-Hackathon-2021
->cd api
- Set up the virtual environment using
source env/bin/activate
- Install the required modules
pip install -r requirements.txt
- Directory will look as follows:
By default, the Docker will expose port 5000, so change this within the Dockerfile if necessary. When ready, simply use the Dockerfile to build the image.
cd api
docker build -t imageonhack .