An Open Source No-Code Solution for Kubernetes Deployment now on Minikube
Tags: kubernetes, devops, devtron, opensource
Published: 2021-06-30 15:30:18

Yes! You read it right. [Devtron](https://devtron.ai/), an open source end-to-end software delivery workflow for Kubernetes, can also be installed over the Minikube cluster, now! [Devtron](https://github.com/devtron-labs/devtron) is a no-code solution for Kubernetes deployment written in go. It helps you to deploy your micro-services over Kubernetes without any code, just in fraction of minutes. So, We have been receiving multiple requests from the community to access Devtron over Minikube cluster. We delivered on it.

In this blog, we will discuss Minikube, its usage and also walk you through the complete installation process of Devtron over the Minikube cluster.

Now, so that Devtron can be installed over minikube, let's understand a bit about it. Minikube is a tool that helps you to run Kubernetes on your local server over a single node cluster. It is platform-agnostic and can be easily installed in your local systems (Windows, MacOS, Linux). 

## Prerequisites
<ul>
<li><a href="https://minikube.sigs.k8s.io/docs/drivers/">Docker container or Virtual Machine (minikube drivers)</a></li>
<li><a href="https://minikube.sigs.k8s.io/docs/drivers/">Kubernetes Installed</a></li>
<li>Good Internet Connection</li>
</ul>

## System Requirements
<ul>
<li>2 CPUs+ cores</li>
<li>4GB+ of free memory</li>
<li>20GB+ free disk space</li>
</ul>

## Cluster Setup in Local System using Minikube
![cluster setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ut4fu0u03g8bhufopzm0.jpg)

To install Devtron, the prerequisite is to have a Kubernetes cluster. We can set up a Kubernetes cluster in our local system using minikube and then manage the pods using kubectl or other Kubernetes command-line tools. Please refer to the <a href="https://minikube.sigs.k8s.io/docs/start/">documentation</a> for detailed instructions to install minikube in your respective systems.

After installation, please execute the following command - 
```
minikube start --cpus 4 --memory 8192
```

The command will start a minikube cluster with 4 CPUs and 8192 memory. We need to provide the extra flags because by default it only takes 2 CPUs and 2048 memory which can be seen from [here](https://github.com/kubernetes/minikube/blob/232080ae0cbcf9cb9a388eb76cc11cf6884e19c0/pkg/minikube/constants/constants.go?ref=hackernoon.com#L102) and it is not sufficient for Devtron installation.

## Devtron Installation
As we have successfully installed a minikube cluster in our system, we are ready to install Devtron over it. The installation of Devtron is pretty straightforward. We can use helm3, helm2, and kubectl to install Devtron. I will be using helm3 for installation. You can refer to the [documentation](https://docs.devtron.ai/setup/install) for more details of installation.

### Installation using helm3
Before getting started with Devtron installation, please make sure helm3 is successfully installed on your system. If it is successfully installed, please follow the following steps to install Devtron.
```
helm repo add devtron https://helm.devtron.ai
```
```
helm install devtron devtron/devtron-operator --create-namespace --namespace devtroncd \
```

The above install command might take around 30 minutes to complete the installation. It will download the inception pod, which in the background will trigger the installation of Devtron.

To confirm the installation has started or not, please use the following command - 
```
kubectl get pod -n devtroncd
```

The expected output should resemble the following pod name - 
<code>Inception-654db887f5-hdnbb</code>

The above pod is responsible for installing Devtron over the cluster. It will launch multiple other pods within 20-30 minutes of the time interval.

To check the installation status please run the following command -
```
kubectl -n devtroncd get installers installer-devtron -o jsonpath='{.status.sync.status}'
```

If the installation is still in progress, it will print <code>Downloaded</code>, and if the installation is complete, <code>Applied</code> is printed.

After the successful completion of installation, we can move ahead to activate the dashboard URL and retrieve login credentials, to begin with, Devtron. For the dashboard URL, we have to use the concept of tunneling. In a separate terminal, please run the following command - 

```
minikube tunnel
```
It will provide a temporary External IP address to access the <code>devtron-service</code>, which can be seen from the following command -

```
kubectl get svc -n devtroncd
```
Now as we have got the External IP, we can use that IP to access the Devtron dashboard. Please copy and paste the IP in your preferred browser.

As we are able to access the dashboard, we need to find the credentials to login into the dashboard and start using it. For admin login use username as <code>admin</code> and for password run the following command -
```
kubectl -n devtroncd get secret devtron-secret -o jsonpath='{.data.ACD_PASSWORD}' | base64 -d
```

The above command will print a string that can be used as a password to login into the application.

Tada! We have successfully installed Devtron in our local system over the minikube cluster. Feel free to leave your doubts, thoughts in the comment section.

For more detailed information about the installation of Devtron in different infrastructures please refer to the official [documentation](https://docs.devtron.ai/setup/install). After installation, to begin with deployment of your application, please [click here](https://docs.devtron.ai/user-guide/creating-application).

{% github devtron-labs/devtron %}