Home Install Rancher with Lets Encrypt on Kubernetes
Post
Cancel

Install Rancher with Lets Encrypt on Kubernetes

Rancher is a Kubernetes management tool to deploy and run clusters anywhere and on any provider.

Prerequisites:

  • Kubernetes cluster
  • Helm 3.x
  • Domain name and ability to perform DNS changes
  • Port 80 & 443 must be accessible for Let’s Encrypt to verify and issue certificates

Pick a subdomain and create a DNS entry pointing to the IP Address that will be assigned to the Rancher Server.

Run the following command to find the IP Address.

1
curl ifconfig.me

Create an A record with the IP Address in your DNS Provider.

1
nslookup subdomain_name

Install cert-manager with Helm

Add the Helm repository:

1
helm repo add jetstack https://charts.jetstack.io --force-update

Update the helm chart repository:

1
helm repo update

Install cert-manager:

1
2
3
4
5
6
helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.15.3 \
  --set crds.enabled=true

Install Rancher:

Create cattle-system namesapce

1
kubectl create ns cattle-system

Add the Helm repository

1
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest

Update the helm chart repository:

1
helm repo update

Deploy Rancher:

1
2
3
4
5
6
helm install rancher rancher-latest/rancher --namespace cattle-system \
   --set hostname=your_hostname \
   --set bootstrapPassword=Password \
   --set ingress.tls.source=letsEncrypt \
   --set letsEncrypt.email=email@address \
   --set letsEncrypt.ingress.class=nginx
1
2
3
kubectl -n cattle-system rollout status deploy/rancher

kubectl get pods -n cattle-system -w

Access Rancher User Interface

1
https://rancher.url
This post is licensed under CC BY 4.0 by the author.