Configure Rancher K8s – Cluster Management

Rancher manages Kubernetes clusters from a single UI. The closest VMware equivalent is SDDC Manager

Prerequisites — Cert-manager

Rancher needs cert-manager installed first. Install it from

https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster

# Add the Jetstack Helm repository

helm repo add jetstack https://charts.jetstack.io

Update your local Helm chart repository cache

helm repo update

Install the cert-manager Helm chart

helm install cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --set crds.enabled=true

Check the cert manager pods

 kubectl get pods --namespace cert-manager

Install Rancher with Helm

helm install rancher rancher-stable/rancher \
  --namespace cattle-system \
  --create-namespace \
  --set hostname=rancher.ash.local \
  --set bootstrapPassword=admin \
  --set ingress.tls.source=rancher

Show pods

 k get pods -n cattle-system

Expose Rancher UI

Export a pod yml file and change type to NodePort and add nodePort values:

kubectl get svc rancher -n cattle-system -o yaml > /tmp/rancher-svc.yaml

Edit nodePort and change type: NodePort

  type: NodePort
  ports:
  - name: http
    port: 80
    nodePort: 30880
  - name: https-internal
    port: 443
    nodePort: 30443

kubectl apply -f /tmp/rancher-svc.yaml

kubectl get svc -n cattle-system

Add to Windows hosts file (C:\Windows\System32\drivers\etc\hosts):

172.16.77.10    rancher.ash.local

Rancher UI should be up now on port 30443

https://rancher.ash.local:30443/dashboard/c/local/explorer/node

(Visited 6 times, 1 visits today)

By Ash Thomas

Ash Thomas is a seasoned IT professional with extensive experience as a technical expert, complemented by a keen interest in blockchain technology.