OnPrem
This guide will help you to install Kuberise.io in an OnPrem cluster. You can use these instructions to install Kuberise.io in your local light Kubernetes cluster installed by minikube, kind or any other similar tools. These tools runs a single-node Kubernetes cluster inside a VM or container on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
Prerequisites
- CLI tools:
kubectl
,helm
,htpasswd
,git
,openssl
,minikube
/kind
- A GitHub account or another Git repository system
Preparations:
When you install your Kubernetes using minikube or KIND or similar tools, they install it in a VM or a Container. If you want to use your ingress domain addresses in your browser to access your services, you need to map the port 80 and 443 of your local machine to port 30080 and 30443 of your Kubernetes container or VM. It is because the external Ingress-Nginx controller uses these NodePorts to expose the services to the outside of the cluster. This is how you can do it in Minikube and KIND:
Minikube
For example, you can start your minikube cluster with the following command:
minikube start --ports=80:30080,443:30443 --cpus=max --memory=max
If you would like to have two minikube cluster running at the same time representing two different platform or environment, you can start the second one with the following command:
minikube start --ports=8080:30080,8443:30443 --cpus=max --memory=max -p minikube2
For the second one, you have to change the ports of local machine, because ports 80 and 443 are already used by the first minikube cluster. Then your dashboards will be also accessible on those ports.
KIND
For KIND, first you have to create a config file like this:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30080
hostPort: 80
protocol: TCP
- containerPort: 30443
hostPort: 443
protocol: TCP
Then you can create your cluster with the following command:
kind create cluster --config kind-config.yaml
Installation Steps
- Fork the Repository: Fork the https://github.com/kuberise/kuberise.io repository into your GitHub account.
- Clone the Repository: Clone your forked repository to your local machine and navigate to the repository folder.
- Run the Installation Script: Execute the following command after replacing the placeholders with your values:Terminal
./scripts/install.sh [CONTEXT] [NAME] [REPO_URL] [REVISION] [DOMAIN] [TOKEN]
[CONTEXT]
: Your Kubernetes context. Find your current context withkubectl config current-context
.[NAME]
: The name of your platform. Ensure there is avalues-[NAME].yaml
file in theapp-of-apps
folder and a[NAME]
folder in thevalues
directory for all configurations.[REPO_URL]
: The URL of your forked repository.[REVISION]
: The branch, commit SHA, or tag you want to use for this installation (e.g., "main" for the main branch).[DOMAIN]
: The domain for the cluster. All platform services and applications will be subdomains of this domain (e.g.,keycloak.[DOMAIN]
). You might useonprem.kuberise.dev
, resulting inkeycloak.onprem.kuberise.dev
.[TOKEN]
: If using a private repository, provide a token here so ArgoCD can access your repository. Skip this parameter if your repository is public. (This token is also used by ArgoCD Image Updater to access the repository and write the updated image tags.)
Example
Assume:
- Your Kubernetes context is
minikube
. - Your platform name is
onprem
. - Your forked repository URL is
https://github.com/yourUsername/kuberise.io.git
- You want to use the
main
branch. - Your domain is
onprem.kuberise.dev
.
Then, the installation command would be:
./scripts/install.sh minikube onprem https://github.com/kuberise/kuberise.io.git main onprem.kuberise.dev
Cloudflare Token
If you are using Cloudflare for your DNS, you can create a cloudflare API token and put it in environment variable CLOUDFLARE_API_TOKEN
, then the installation script will automatically create a Kubernetes secret and the ExternalDNS will use it to update the DNS records for your External Ingresses.
Post Installation
After the installation you can open the dashboards in your browser using the appropriate URLs. For example, if your domain is onprem.kuberise.dev
, you can access the ArgoCD dashboard at https://argocd.onprem.kuberise.dev
. and Grafana dashboard at https://grafana.onprem.kuberise.dev
.
For your information, onprem.kuberise.dev
is a valid domain name that translates to 127.0.0.1 and you can use it for your local development environment.
Also the ./script/install.sh
script is idempotent, you can run it multiple times to update your installation without any problem. You need to run the install.sh script again, if you change values of the ArgoCD helm chart or the install.sh script itself. Also you have to run install.sh script for each platform separately. For example if you want to create multiple platform for different environments or for different purposes, you have to run the install.sh script for each platform.