Helm: the package manager for Kubernetes

Helm is a tool for managing Kubernetes charts. Charts are packages of pre-configured Kubernetes resources. Think of it like apt for Kubernetes.

ref:
https://github.com/kubernetes/helm

Install

Install Helm client, helm.

$ brew install kubernetes-helm

ref:
https://docs.helm.sh/using_helm/#installing-helm

Install Helm server, tiller.

On Kubernetes v1.8+, Role-Based Access Control (RBAC) is enabled by default. So you must create a ClusterRoleBinding which specifies a ClusterRole and a ServiceAccount for tiller.

# helm/rbac.yaml
kind: ServiceAccount
apiVersion: v1
metadata:
  name: tiller
  namespace: kube-system
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: tiller
    namespace: kube-system
$ kubectl apply -f helm/rbac.yaml && \
  helm init --service-account tiller

$ kubectl get all --namespace kube-system

# uninstall tiller
$ helm reset

ref:
https://docs.helm.sh/using_helm/#role-based-access-control
https://docs.helm.sh/using_helm/#installing-tiller

Usage

# show both the client and server version to make sure installation is correct
$ helm version
Client: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"}

# install a Chart
$ helm install \
--name cert-manager \
--namespace kube-system \
stable/cert-manager

# install a Chart without RBAC
$ helm install \
--name cert-manager \
--namespace kube-system \
--set rbac.create=false \
stable/cert-manager

# list Releases
$ helm ls
$ helm ls --all cert-manager

# delete a Release
$ helm del --purge cert-manager

ref:
https://docs.helm.sh/helm/#helm

Charts

In my humble opinion, it might be more flexible and realistic just to copy YAML files from a Helm chart and maintain them, instead of running a helm install.

ref:
https://github.com/kubernetes/charts