Control Plane
Self-hosting a DevZero Control Plane on Rancher.
This document helps you install DevZero self-hosted Control Plane on a single-node Rancher Kubernetes cluster.
For a detailed overview of the DevZero Control Plane, click here
What is Rancher?
Rancher is like a control panel for Kubernetes clusters. It gives you an easy-to-use interface where you can manage multiple clusters, monitor workloads, and handle storage or permissions—all from one place. In this setup, we’ll run Rancher on a single server using Docker.
Why use Rancher?
The main reasons to use Rancher are:
- It simplifies Kubernetes management.
- You get a dashboard to see everything happening in your cluster.
- It’s great for small setups or testing environments.
Prerequisites
The following tools and resources are needed to setup a DevZero Control Plane hosted on Rancher:
Steps to set up Control Plane on Rancher
Run Rancher on Docker
Run Rancher in a container with this command:
docker run -d --privileged --restart=unless-stopped --mount -p 9080:80 -p 9443:443 --name rancher-server rancher/rancher:latest
Get the Container ID of the docker container running the Rancher:
docker ps
Get your password to log in to the rancher platform from this command:
docker logs <container-id> 2>&1 | grep "Bootstrap Password:"
Connect with Rancher Cluster
Log in to the Rancher portal at http://localhost:9080
, and download the kubeconfig of the rancher's local cluster:
Update your local kubeconfig with the download kubeconfig of the rancher cluster:
mv local.yaml ~/.kube/config
Set up Local Storage
Apply this manifest to create the required resources to use local storage in persistentvolumeclaim
:
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/refs/heads/master/deploy/local-path-storage.yaml
Set the created storageclass as default:
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Install DevZero Control Plane
Install the CRDs for the Control Plane:
helm pull oci://registry-1.docker.io/devzeroinc/dz-data-plane-crds
helm install dz-control-plane-crds oci://registry-1.docker.io/devzeroinc/dz-control-plane-crds -n devzero --create-namespace
Install the Control Plane:
helm pull oci://registry-1.docker.io/devzeroinc/dz-control-plane
helm install dz-control-plane oci://registry-1.docker.io/devzeroinc/dz-control-plane -n devzero --set domain=<your-domain> --set issuer.email=support@devzero.io --set credentials.registry=docker.io/devzeroinc --set credentials.username=<docker-user> --set credentials.password=<docker-pswd> --set credentials.email=garvit3835@gmail.com --set backend.licenseKey=<your-backend-license-key>
Contact the DevZero team at support@devzero.io to get your credentials and license key.
Unseal the Vault
Once the installation is complete, get the keys to unseal the Vault:
kubectl exec -n devzero dz-control-plane-vault-0 -- vault operator init
Copy three unseal keys out of the five in the output and unseal the vault with these commands:
kubectl exec -n devzero dz-control-plane-vault-0 -- vault operator unseal <UNSEAL_KEY_1>
kubectl exec -n devzero dz-control-plane-vault-0 -- vault operator unseal <UNSEAL_KEY_2>
kubectl exec -n devzero dz-control-plane-vault-0 -- vault operator unseal <UNSEAL_KEY_3>
Fix Prometheus DaemonSet Configuration
To resolve the root filesystem mount issue with the Prometheus container running in a Rancher cluster, edit the Prometheus DaemonSet:
kubectl edit daemonset dz-control-plane-prometheus-node-exporter -n devzero
Remove the hostPath with path: /root
and mountPath: /host/root
Setting up Data Plane on a Rancher Cluster
To set up the data plane in the same cluster, follow the guide for Setting up the Data Plane on Rancher from here.