The simplest way to run your own Heroku on Kubernetes
Tags: webdev, tutorial, beginners, opensource
Published: 2022-11-28 09:06:09

In this tutorial, we will spin up a Kubernetes Kind Cluster and install Kubero on it. [Kind](https://kind.sigs.k8s.io/) is an easy way to build knowledge in the field of Kubernetes and since it runs on your local machine it does not incur any costs.

[Kubero](https://github.com/kubero-dev/kubero) is a PaaS for Kubernetes, which claims to have the most similar workflows to Heroku. 
- It comes with a UI, API, and CLI
- It is 100% open source.
- It has automatic deployments and reviewapps 
- Supports any language and framework

You will find a detailed explanation of Kubero in the first part [here](https://dev.to/shoksuno/replace-heroku-with-kubero-on-kubernetes-2aoj)

![Kubero Pipelines example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p6abp3ue013m7q9a45mx.png)

What you will need for this tutorial:
- [kubectl](https://kubernetes.io/docs/tasks/tools/) installed 
- [kind](https://kind.sigs.k8s.io/docs/user/quick-start/) installed

## 1) Install the Kubero CLI 
Download, unpack and install the Kubero CLI binary from the [Github release Page](https://github.com/kubero-dev/kubero-cli/releases/latest) 

## 2) Run the install command 
```bash
kubero install
```

You will now be guided thru the installation steps: 
- Install Kind (or Linode, GKE, DigitalOcean, Scaleway)
- Install OLM
- Install Ingress
- Install Kubero

If it fails at some point, don't worry. Just restart the installer and skip the first step "Kubernetes Installation" part. 

This is an image of the full installation process.

![Full Terminal output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x4h3ylto75gnk512kje4.jpg)

But let's walk thru the single steps. 

The green value is the suggested default. If this fits your needs and preferences, just hit "enter". 

### 2.1 Binaries check
The installer will first check if the required binaries are available.

### 2.2 Kind installation
For this tutorial we want to install Kind. So we need to say "y" here. But if you already have a cluster you want to use, just skip this part. Make sure you have selected the right context.
-> select "y"
-> name your cluster
-> select an available HTTP Port
-> select an available HTTPS Port

The Kind installation may take about a minute or two. The kubectl connection information and credentials are being exported by kind automatically.

### 2.3 Check the Kubernetes Cluster
Just to be sure for the next steps, let's check which Kubernetes context is selected.

### 2.3 Install OLM
OLM [(Operator Lifecyle Manager)](https://olm.operatorframework.io/) is a component of the Operator Framework, an open source toolkit to manage Kubernetes native applications, called Operators, in a streamlined and scalable way.
-> select the latest release "0.22.0" 

### 2.4 Install NginX Ingress
Our new Kind cluster needs Ingress to expose running services in our cluster. We now need to select the provider. For this tutorial, is "kind" the right choice.
-> select "y"
-> select "kind"

### 2.5 Install Kubero Operator
Now we need our Operator. The Operator is required to deploy all Kubero pipelines and apps.
-> select "y"

### 2.6 Install the Kubero UI 
We need this since the CLI talks to the API, which is installed with the UI. You don't need the UI Container if you plan to deploy your apps only by kubectl, which is possible, since every pipeline and app is a common Kubernetes Custom Resource Definitions. 
-> select "y"
-> add a random string for the webhook secret. This will be used, to make sure only your webhooks are allowed to talk with your Kubero.
-> add a random string for the session key. 
-> Add your github personal access token. We ned this create webhooks and add deployment credentials. 


## 3) Accessing the UI
You should now be able to access the Kubero UI with the provided URL and credentials. The misspelled lacolhost.com domain points always to your localhost.

![Kubero installation final result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2g76d9vguisw0yb3hfh.png)


Let me know here in the comments if something fails or open issue in the main Kubero repository.