Monday, February 27, 2023

Rancher Suite K8S Adventure - Chapter 011 - Install Rancher on RKE2 cluster

Rancher Suite K8S Adventure - Chapter 011 - Install Rancher on RKE2 cluster

A travelogue of converting from OpenStack to Suse's Rancher Suite for K8S including RKE2, Harvester, kubectl, helm.

The next step is to install Rancher on the RKE2 cluster.  Happily, this is the simplest step of the entire series, so far.

The references are:

https://www.rancher.com/products/rancher

https://ranchermanager.docs.rancher.com/

https://ranchermanager.docs.rancher.com/getting-started/quick-start-guides/deploy-rancher-manager/helm-cli

https://ranchermanager.docs.rancher.com/pages-for-subheaders/install-upgrade-on-a-kubernetes-cluster

There's really only one line to run, admittedly a very long line:

helm install rancher rancher-latest/rancher \
  --namespace cattle-system \
  --version 2.7.1 \
  --set hostname=rancher.cedar.mulhollon.com \
  --set replicas=1 \
  --set bootstrapPassword=ThisIsNotMyRealPassword

Obviously your hostname and password and maybe even requested version will be different than the above.  Don't use a real password, I will explain later.

Lets watch the process of the install:

kubectl -n cattle-system rollout status deploy/rancher

Note this will take awhile... at least five minutes in my experience.

Remember when I noted that you should not use a "real" password for the bootstrap password?  Try this command line:

kubectl get secret --namespace cattle-system bootstrap-secret -o go-template='{{.data.bootstrapPassword|base64decode}}{{"\n"}}'

Oh.  That's why.  Although I suppose anyone who has root or kubectl access on your cluster pretty much owns the cluster and everything on it anyway so not much loss in having the password in there.

Tomorrow we're done with the CLI and installation tasks; its time to tour Rancher!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.