Contact Us Today! 301-337-8141 | [email protected]
Call Us: 301-337-8141
Rancher
01 Jul 2021
| By AlphaBravo Engineering | Categories: Uncategorized

Deploying Rancher on EKS

Deploying Rancher on EKS

You will need the following tools:

Step 1:

Configure AWS CLI

1aws configure

Step 2:

Create EKS cluster using eksctl tool

1eksctl create cluster \
2 --name rancher-server \
3 --version 1.18 \
4 --region us-east-2 \
5 --nodegroup-name ranchernodes \
6 --nodes 3 \
7 --nodes-min 1 \
8 --nodes-max 4 \
9 --managed

Ed’s version

1eksctl create cluster \
2 --name rancher-server \
3 --version 1.20 \
4 --region us-east-2 \
5 --nodegroup-name ranchernodes \
6 --node-ami-family Ubuntu2004 \
7 --node-type t3a.large \
8 --nodes 3 \
9 --nodes-min 2 \
10 --nodes-max 5 \
11 --node-volume-size=100 \
12 --node-volume-type=gp3 \
13 --managed \
14 --ssh-access \
15 --ssh-public-key=ab-eengelking-04272021 \
16 --tags environment=coder

Step 3:

Verify the cluster is online

1eksctl get cluster

Step 4:

Install Ingress on the cluster

1helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
2helm repo update
3helm upgrade --install \
4 ingress-nginx ingress-nginx/ingress-nginx \
5 --namespace ingress-nginx \
6 --set controller.service.type=LoadBalancer \
7 --version 3.12.0 \
8 --create-namespace

Step 5:

Get the load balancer IP

1kubectl get service ingress-nginx-controller --namespace=ingress-nginx

Step 6:

Point DNS to the load balancer external IP address

Step 7:

Add the Helm chart repo (stable)

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

Step 8:

Create Cattle namespace

1kubectl create namespace cattle-system

Step 9:

Install Cert-Manager CRDs

1kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.4/cert-manager.crds.yaml

Step 10:

Create Cert-Manager namespace

1kubectl create namespace cert-manager

Step 11:

Add the Cert-Manager helm repo

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

Step 12:

Install Cert-Manager via Helm. Be sure to use the latest chart!

1helm install \
2 cert-manager jetstack/cert-manager \
3 --namespace cert-manager \
4 --version v1.0.4

Step 13:

Ensure Cert-Manager has deployed and is running

1kubectl get pods --namespace cert-manager

Step 14:

Install Rancher UI

1helm install rancher rancher-stable/rancher \
2 --namespace cattle-system \
3 --set hostname=rancher.my.org \
4 --set ingress.tls.source=letsEncrypt \
5 --set [email protected]

Step 15:

Ensure Rancher has successfully deployed

1kubectl -n cattle-system rollout status deploy/rancher
2
3or
4
5kubectl -n cattle-system get deploy rancher

Step 16:

Enable forwarded headers in ingress-nginx-controller configmap

1data:
2 use-forwarded-headers: 'true'