[Kubernetes (K8S)] Helm install Rancher Container Management Platform for Kubernetes (K8S)

Rancher

Rancher is a complete container management platform for Kubernetes, giving you the tools to successfully run Kubernetes anywhere.

Rancher can provision Kubernetes from a hosted provider, provision compute nodes and then install Kubernetes onto them, or import existing Kubernetes clusters running anywhere.

One Rancher server installation can manage thousands of Kubernetes clusters and thousands of nodes from the same user interface.

Rancher adds significant value on top of Kubernetes, first by centralizing authentication and role-based access control (RBAC) for all of the clusters, giving global admins the ability to control cluster access from one location.

It then enables detailed monitoring and alerting for clusters and their resources, ships logs to external providers, and integrates directly with Helm via the Application Catalog. If you have an external CI/CD system, you can plug it into Rancher, but if you don’t, Rancher even includes a pipeline engine to help you automatically deploy and upgrade workloads.

This article is about how to use Helm to deploy Rancher on Kubernetes (K8S).

Prerequisites

  • Kubernetes (K8S)
    Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.

    For more information about installing and using Kubernetes (K8s), see the Kubernetes (K8s) Docs.

  • Helm
    Helm is the best way to find, share, and use software built for Kubernetes.

    For more information about installing and using Helm, see the Helm Docs.

Installation

Custom Values.yaml

Remember to replace the values within {{ }}.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# values.yaml

# rancher/values.yaml at master · rancher/rancher
# https://github.com/rancher/rancher/blob/master/chart/values.yaml

# Fully qualified name to reach your Rancher server
hostname: {{ .Values.hostname }}

### ingress ###
# Readme for details and instruction on adding tls secrets.
ingress:

tls:
# options: rancher, letsEncrypt, secret
source: {{ .Values.ingress.tls.source }}

Install by Helm

Helm install rancher into cattle-system namespace.

1
2
3
4
5
6
7
8
9
10
11
# crate namespace:
$ kubectl create namespace cattle-system

# Add the Helm repository:
$ helm repo add rancher-stable https://releases.rancher.com/server-charts/stable

# Update your local Helm chart repository cache:
$ helm repo update

# To install Helm chart:
$ helm install rancher rancher-stable/rancher --namespace cattle-system -f values.yaml

See Helm release about rancher.

1
2
3
$ helm list --namespace cattle-system
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
rancher cattle-system 1 2020-10-03 12:01:26.378354 +0800 +0800 deployed rancher-2.4.8 v2.4.8

See pods about rancher.

1
2
3
4
5
6
7
$ kubectl get pods -n cattle-system
NAME READY STATUS RESTARTS AGE
cattle-cluster-agent-77c768fc96-dvz7l 1/1 Running 11 11d
cattle-node-agent-29pn6 1/1 Running 12 11d
rancher-6b78b4b7fd-79l2h 1/1 Running 2 5d10h
rancher-6b78b4b7fd-fbpg2 1/1 Running 3 5d
rancher-6b78b4b7fd-vdnhc 1/1 Running 2 5d10h

Then, you can visit Rancher Web UI with https://

References

[1] Rancher Docs: Install Rancher on a Kubernetes Cluster - https://rancher.com/docs/rancher/v2.x/en/installation/install-rancher-on-k8s/

[2] Rancher 2.x Docs: What is New? - https://rancher.com/docs/rancher/v2.x/en/

[3] Helm - https://helm.sh/

[4] Kubernetes - https://kubernetes.io/