# Setting Up Devtron on Kubernetes Cluster

[Devtron](https://devtron.ai/) is a production-ready Kubernetes-native Application Management Platform that covers all your requirements on Kubernetes, such as continuous integration, continuous delivery, GitOps, observability, troubleshooting, security, and governance.

I heard about Devtron first at KCD Bengaluru and I couldn't help but get excited when I was told that Devtron could manage your application requirements on Kubernetes end to end. I had to give it a try already.

### Pre-Requisites

* kubectl Installation (On Windows), Refer [Install Tools | Kubernetes](https://kubernetes.io/docs/tasks/tools/) for MacOS / Linux.
    
    ```powershell
    curl.exe -LO "https://dl.k8s.io/release/v1.27.3/bin/windows/amd64/kubectl.exe"
    ```
    
* helm Installation, download helm release based on your system, [Releases · helm/helm (](https://github.com/helm/helm/releases)[github.com](http://github.com)[)](https://github.com/helm/helm/releases)
    
* Skip this step if you already have kubectl and helm installed
    

### Setup

* Create a 2-Node k8s Cluster from your preferred provider, in this article - I'll be using Digital Ocean.
    
    * Minimum system configurations required for Devtron Installation
        
        1. 1.2 vCPUs
            
        2. 2.4GB+ of free memory
            
        3. 3.20GB+ free disk space
            
* I'll be choosing node size with 2.5GB RAM(usable 4GB)/2vCPU configuration with two of them
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690100022208/67ef2c8e-9ab7-46a4-91ab-af423baf14cc.png align="center")
    
* Once your cluster is up and running, check the node status
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690100079509/d964f47c-6711-48db-8d48-f3723b50a668.png align="center")
    
* Install Devtron with CI/CD along with GitOps (Argo CD)
    
    ```powershell
    helm repo add devtron https://helm.devtron.ai
    
    helm install devtron devtron/devtron-operator \
    --create-namespace --namespace devtroncd \
    --set installer.modules={cicd} \
    --set argo-cd.enabled=true
    ```
    
* You'll get instructions like the below screenshot after running the above command
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690100625791/8edc5ff5-1f04-4cfd-b56d-8f64accd725d.png align="center")
    
* Get the status of all pods in the devtroncd namespace
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690100741496/3fe29d32-5a79-49ae-9ecb-01b62fce375b.png align="center")
    
* Get the status of all jobs in devtroncd namespace
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690100780735/9fcf54f6-fef4-4432-ba80-3c68c2da355b.png align="center")
    
* Access the Ingress Endpoint, IP address from the below command
    
    ```powershell
    kubectl get svc -n devtroncd devtron-service -o jsonpath='{.status.loadBalancer.ingress}'
    ```
    
* Log in as administrator with the password from the below command:  
    `kubectl -n devtroncd get secret devtron-secret -o jsonpath='{.data.ADMIN_PASSWORD}' | base64 -d`
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690101005411/ec132de6-70d6-4605-ab37-cc31a82ea6b3.png align="center")
    
* After logging in, you can either pick to create app from scratch or deploy from available helm charts
    
* This is an example of deploying metrics-server helm chart
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690101363506/bc0231bb-b359-4fa1-adfa-b6b7e3bb5002.png align="center")
    
* Before and after metrics-server installation
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690101455583/2c312d5f-cb7a-4621-b1b5-5260f92ec06b.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690101599777/446dd291-e921-4ea9-89ef-32351c276aa4.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690101472847/9d6bd64b-b4f4-48a1-a92f-24ded578e9b3.png align="center")
    
* Memory/CPU consumption of pods in devtroncd namespace
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690101533618/bcfde4d2-ed60-4829-8892-fdf40c4860e3.png align="center")
    
* You can add integrations from 'Discover integrations' section, ex: Grafana (Monitoring)
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690102030819/8a97d091-d450-4992-bfb1-8c972fc494bc.png align="center")
    
* Explore resource browser to get a view into currently deployed kubernetes resources
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690102265357/40ce4661-a272-44a1-ae65-79c61ddd2cd6.png align="center")
    
* Try to install Prometheus helm chart from the CLI
    
    ```powershell
    helm install my-release oci://registry-1.docker.io/bitnamicharts/kube-prometheus
    ```
    
* Go back to the Devtron UI to observe that your helm installation from CLI is auto-discovered
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690103032879/3012d8e9-d604-42fe-8036-9e9cb0aceb52.png align="center")
    
* Port forward Prometheus service to 9090 to view it on your localhost
    
    ```powershell
    kubectl port-forward --namespace prometheus-operator svc/my-release-kube-prometheus-prometheus 9090:9090
    ```
    
* Explore different metrics and their graphs
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690104076471/8773edf8-9341-4d5a-a16c-05de0b9bdcc2.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690104546890/a0c7ea46-39d4-4335-9864-c41dfadb2675.png align="center")
    
* Devtron also enables you to ssh into the node of the connected k8s cluster
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690104686177/07b77b78-dee9-416a-80b1-29a99fe29b96.png align="center")
    

That's all from the setup side of things. Please share your implementations of Devtron in the comments.  
Thank you!
