Helm
Install Helm and Tiller
You will need the Helm client (e.g. helm.exe on Windows) and the server portion of Helm, which is called Tiller.
First install the Helm Client from https://github.com/kubernetes/helm/releases. The Windows executable is here: https://storage.googleapis.com/kubernetes-helm/helm-v2.4.2-windows-amd64.zip. Unpack helm.exe from the zip and copy it to a folder in your path.
You can install Tiller on your Kubernetes cluster or locally. When installed locally, it needs to be configured to talk to a remote Kubernetes cluster.
The simplest way to install it, is with helm init:
The installation is done in the kube-system namespace of the default Kubernetes cluster configured in kubectl (use
kubectl config view
to check). To see that it is running, use
kubectl get pods --namespace kube-system
You can now run helm version
to see the client and server version:
For more information about installing Helm client and server, check https://github.com/kubernetes/helm/blob/master/docs/install.md.
Using Helm
The purpose of Helm is to make it easier to install applications in a Kubernetes cluster. To install MySQL for instance, you would use the following commands:
helm search mysql
helm install stable/mysql
stable/mysql above refers to what Helm calls a chart. A chart is a Helm package that contains all the necessary definitions to run an application inside of a Kubernetes cluster. In that sense, a chart is similar to a Homebrew formula or an apt package. An instance of a deployed chart is called a release. You can install a chart several times in a cluster. Every time you do so, a new release is created. Each release will have its own name, either set by Helm or by you.
In this case, several things are deployed:
- secret: MySQL root password
- persistentvolumeclaim
- service: port 3306/TCP on an IP address within the cluster
- deployment: actual deployment of the containers and pods
Depending on the underlying hardware, it might take a while for the deployment to be ready. Use kubectl get pods
to check. You can also check the deployment with helm list:
To remove the above, use helm delete pioneering-terrier
. You can still obtain information about the release because helm keeps track of deletes as well. Use helm status pioneering-terrier
to obtain status information.
You noticed that helm assigned a name to the release, similar to what happens when you launch a Docker container on a Docker host. To name your release, use:
helm install --name your_release_name chart
You can go to https://kubeapps.com/ to discover and launch other Kubernetes-ready apps. For more information about using Helm, see https://github.com/kubernetes/helm/blob/master/docs/using_helm.md.