Skip to content

Latest commit

 

History

History
45 lines (40 loc) · 1.67 KB

rancher-helm-on-k8s.md

File metadata and controls

45 lines (40 loc) · 1.67 KB

Rancher with Helm chart

This assumes Ubuntu OS

  1. Install kubectl binary (source)
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

  1. Install helm binary (source)
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
  1. Place kubeconf to ~/.kube/config or repoint env var $KUBECONFIG
  2. Create namespace for rancher
kubectl create namespace cattle-system
  1. Add Rancher helm repos stable and latest
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
  1. Install Rancher helm chart (source)
helm install rancher rancher-latest/rancher \
  --namespace cattle-system \
  --set hostname=rancher.my.org \
  --set bootstrapPassword=admin \
  --set ingress.tls.source=secret
  1. Add Secret
kubectl -n cattle-system create secret tls tls-rancher-ingress \
  --cert=tls.crt \
  --key=tls.key

_Make sure the file names are tls.crt and tls.key