rasti.hil@hilandco.com +41 79 367-9677

Search This Blog

Installing Rancher on Azure Kubernetes Service


brew update && brew install azure-cli && brew install helm 


az login

az group create --name rancher02-rg --location eastus

az aks get-versions --location eastus --output table

az aks create --resource-group rancher02-rg --name rancher-server --kubernetes-version 1.19.13 --node-count 1 --node-vm-size Standard_D2_v3

az aks get-credentials --resource-group rancher02-rg --name rancher-server


helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm upgrade --install \
  ingress-nginx ingress-nginx/ingress-nginx \
  --namespace ingress-nginx \
  --set controller.service.type=LoadBalancer \
  --version 3.12.0 \
  --create-namespace
  
  
kubectl get service ingress-nginx-controller --namespace=ingress-nginx

https://rancher42.eastus.cloudapp.azure.com

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

kubectl create namespace cattle-system

kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml

#kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.1.0/cert-manager.yaml


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

helm repo update

helm install cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.5.1
  

kubectl get pods --namespace cert-manager

# we use letsEncrypt
# OK:
helm install rancher rancher-stable/rancher \
  --namespace cattle-system \
  --set hostname=rancher42.eastus.cloudapp.azure.com \
  --set replicas=1 \
  --set ingress.tls.source=letsEncrypt \
  --set letsEncrypt.email=mail@gmail.com

kubectl -n cattle-system rollout status deploy/rancher

kubectl -n cattle-system describe pod
kubectl -n cattle-system get pods
kubectl -n cattle-system logs -f rancher-784d94f59b-vgqzh


curl -v rancher42.eastus.cloudapp.azure.com