Rancher server is installed using the Helm package manager for Kubernetes.
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
kubectl create namespace cattle-system
The cert-manager is a Kubernetes add-on to automate the management and issuance of TLS certificates from various issuing sources. Rancher relies on cert-manager to issue certificates from Rancher’s own generated CA or to request Let us Encrypt certificates.
$ kubectl apply --validate=false -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.12/deploy/manifests/00-crds.yaml
$ kubectl create namespace cert-manager
$ kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true
$ helm repo add jetstack https://charts.jetstack.io
$ helm repo update
$ helm install \
> --name cert-manager \
> --namespace cert-manager \
> --version v0.12.0 \
> jetstack/cert-manager
$ kubectl get pods -n cert-manager
NAME READY STATUS RESTARTS AGE
cert-manager-75cf57777c-ztw9f 1/1 Running 0 2m2s
cert-manager-cainjector-f54c57bf8-wkc2z 1/1 Running 0 2m2s
cert-manager-webhook-76794c6967-84gb6 1/1 Running 0 2m2s
[root@rancher ~]# helm install rancher-latest/rancher \
> --name rancher \
> --namespace cattle-system \
> --set hostname=rancher.rack9lab.com
NAME: rancher
LAST DEPLOYED: Tue Jan 21 03:21:58 2020
NAMESPACE: cattle-system
STATUS: DEPLOYED
..
..
NOTES:
Rancher Server has been installed.
NOTE: Rancher may take several minutes to fully initialize. Please standby while Certificates are being issued and Ingress comes up.
Check out Rancher docs at https://rancher.com/docs/rancher/v2.x/en/
Browse to https://rancher.rack9lab.com
Happy Containering!
[root@rancher ~]#
[root@rancher helm]# kubectl get pods –cattle-system
NAMESPACE NAME READY STATUS RESTARTS AGE
cattle-system cattle-cluster-agent-85db6685cd-vvft9 1/1 Running 0 7h19m
cattle-system cattle-node-agent-6c8nw 1/1 Running 0 7h19m
cattle-system cattle-node-agent-jhw2n 1/1 Running 0 7h19m
cattle-system cattle-node-agent-wh78g 1/1 Running 0 7h19m
cattle-system rancher-5d549cb9c8-2xmj5 1/1 Running 0 7h23m
cattle-system rancher-5d549cb9c8-8bbzs 1/1 Running 0 7h23m
cattle-system rancher-5d549cb9c8-bh22p 1/1 Running 0 7h23m
Result: Rancher is up and running.
Figure 6. Rancher Server login
Result: The three nodes are listed in the local cluster that represent the Rancher Management Cluster.
Figure 7. Nodes in the Rancher Management Cluster