Helm Guid

Introduction

What Is Helm?

  • Helm is a Package Manager for Kubernetes.

NodeJS is to Kubernetes as NPM is to HELM!
Ruby is to Kubernetes as Gems are to HELM!
Swift is to Kubernetes as CocoaPods are to HELM!
Java is to Kubernetes as Maven is to HELM!

  • A Helm Chart is a Helm Package. This is the chart or “instructions” of how to put together your releasable package.

  • Tiller is a server that runs inside your Kubernetes Cluster anytime you install Helm. Tiller manages installations of your Helm Charts. As Tiller installs containers into your Kubernetes Cluster on your behalf, security around this process should be a high priority for you.


Installation on GKE

https://medium.com/google-cloud/installing-helm-in-google-kubernetes-engine-7f07f43c536e

Installation on Kubernetes

Install Helm on Local

On MacOS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
brew install kubernetes-helm

kubectl config view

helm init

kubectl get pods --namespace kube-system
# NAME READY STATUS RESTARTS AGE
# canal-lsjj7 2/2 Running 1 40m
# canal-m68fv 2/2 Running 0 18h
# kube-dns-autoscaler-67595559f7-qk4gk 1/1 Running 0 18h
# kube-dns-b74d847f-jhn8f 3/3 Running 0 18h
# kube-dns-b74d847f-xxnjj 3/3 Running 0 40m
# kube-proxy-dt926 1/1 Running 0 18h
# kube-proxy-js65k 1/1 Running 0 40m
# kubernetes-dashboard-7d75c474bb-5lmbv 1/1 Running 0 18h
# metrics-server-6dd5674bf7-jt4gh 1/1 Running 0 18h
# tiller-deploy-75f6c87b87-zg6ck 1/1 Running 0 15m
# wormhole-5st2b 1/1 Running 0 18h
# wormhole-xb8lw 1/1 Running 0 39m

https://helm.sh/docs/using_helm/
https://medium.com/google-cloud/install-secure-helm-in-gke-254d520061f7


Command

  • helm install

    source from repository、tar、local and url
    helm install stable/nginx
    helm install ./nginx-1.2.3.tgz
    helm install ./nginx
    helm install https://example.com/charts/nginx-1.2.3.tgz

  • helm search

  • helm ls
  • helm delete
  • helm rollback
  • helm repo update
  • helm status

Delete

1
2
3
4
5
6
7
8
9
10
helm ls --short gives a list of releases ids.

helm delete id1 id2 id3 deletes realeses with ids: id1, id2, id3.

So combining them we get: helm delete $(helm ls --short)


helm ls --all

helm del --purge harbor

Update

1
2
3
4
helm upgrade -f values.yaml harbor file_path

# restart all pod
helm upgrade --recreate-pods harbor file_path

nodeSelector


Reference