Install k3s and rancher on ubuntu VM

In this tutorial i will  demonstrate how to first install k3s and then install rancher on that k3s.


  • A virtual machine.
  • HELM installed


Install k3s.

     NOTE: i am installing the “v1.25.10-rc1+k3s1” version cuz at that time this is the newest allowed for using latest rancher.

curl | INSTALL_K3S_VERSION=v1.25.10-rc1+k3s1 sh - 

Install CRD’s

kubectl apply -f

Add the Jetstack HELM repository and update local chart repository cache

helm repo add jetstack && helm repo update

Install the cert manager HELM chart

helm install cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.5.1


  1. add rancher stable repository and update
helm repo add rancher-stable && helm repo update

        2. install the charts

            The ” –set global.cattle.psp.enabled=false” required to get rid of the following error:

            Error: INSTALLATION FAILED: execution error at (rancher/templates/validate-psp-install.yaml:4:5): The target cluster does not have the PodSecurityPolicy API resource. Please disable PSPs in this chart before proceeding.

            “–set hostname=rancher.local” add a relevant value to your hosts file.

helm install rancher rancher-stable/rancher \
  --namespace=cattle-system \
  --create-namespace \
  --set hostname=rancher.local \
  --set replicas=3 \
  --set bootstrapPassword=admin \
  --set global.cattle.psp.enabled=false

And then after a couple of minutes you will be able to load the following URL and start the journey…


And thats about it….