Rancher K8s Helm

4/3/2020

If this has been asked before, my apologizes. I am attempting to run helm with inside my Rancher k8s environment via the kubectl UI, but I am being told that helm is not installed. So not sure how I am supposed to get helm installed.

If anyone knows how to accomplish this, I would appreciate this.

-- grimm-muncha
kubernetes
rancher

1 Answer

4/6/2020

Installing Helm on RKE is basically the same as installing on any other kubernetes cluster.

Make sure you are downloading Helm V3 because it doesn require tiller anymore and it makes things a lot easier.

You can find the latest version here.

Let me guide you on how to do it successfully:

Download desired version of Helm.

curl -fsSL -o helm-v3.1.2-linux-amd64.tar.gz  https://get.helm.sh/helm-v3.1.2-linux-amd64.tar.gz

Decompress it:

> tar xzvf helm-v3.1.2-linux-amd64.tar.gz 
linux-amd64/
linux-amd64/helm
linux-amd64/README.md
linux-amd64/LICENSE

Check what files we have:

> cd linux-amd64/
> ls -la
total 37576
drwxr-xr-x 2 nobody nogroup      100 Mar 12 18:40 .
drwxrwxrwt 4 root   root         160 Apr  6 09:11 ..
-rw-r--r-- 1 nobody nogroup    11373 Mar 12 18:40 LICENSE
-rw-r--r-- 1 nobody nogroup     3238 Mar 12 18:40 README.md
-rwxr-xr-x 1 nobody nogroup 38461440 Mar 12 18:38 helm

Check version:

> ./helm version
version.BuildInfo{Version:"v3.1.2", GitCommit:"d878d4d45863e42fd5cff6743294a11d28a9abce", GitTreeState:"clean", GoVersion:"go1.13.8"}

Now let's add a repository to it so we can test if helm is working properly:

> ./helm repo add nginx https://helm.nginx.com/stable
"nginx" has been added to your repositories

Search for nginx-ingress (example):

> ./helm search repo nginx-ingress
NAME                    CHART VERSION   APP VERSION     DESCRIPTION             
nginx/nginx-ingress     0.4.3           1.6.3           NGINX Ingress Controller

Ans finally, let's apply something in our cluster using helm:

> ./helm install my-ingress-controller nginx/nginx-ingress
NAME: my-ingress-controller
LAST DEPLOYED: Mon Apr  6 09:12:24 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The NGINX Ingress Controller has been installed.

Let's check if it applied as expected:

> kubectl get deployments      
NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
my-ingress-controller-nginx-ingress   1/1     1            1           9m43s

Please let me know if this answer helped you on solving your problem.

-- mWatney
Source: StackOverflow