Helm v2 Tiller plugin aka Tillerless Helm
Helm v2 plugin for using Tiller locally and in your CI/CD pipelines.
Blog post Tillerless Helm v2 on why Tillerless Helm
is needed and what it solves.
Helm 3.0.0 has been released, check it out my blog post How to migrate from Helm v2 to Helm v3.
Install Helm client as per one of recommended ways.
Note: Initialize helm with helm init --client-only
, flag --client-only
is a must as otherwise you will get Tiller
installed in to Kubernetes cluster.
Then install the latest plugin version:
helm plugin install https://github.com/rimusz/helm-tiller
Note: For a better security Tiller plugin comes with preset storage as Secret
.
Usage:
helm tiller install
helm tiller start [tiller_namespace]
helm tiller start-ci [tiller_namespace]
helm tiller stop
helm tiller run [tiller_namespace] -- [command] [args]
Available Commands:
install Manually install/upgrade Tiller binary
start Start Tiller and open new pre-set shell
start-ci Start Tiller without opening new shell
run Start Tiller and run arbitrary command within the environment
stop Stop Tiller
Available environment variables:
HELM_TILLER_SILENT=true
, only helm
cli output will be printed.HELM_TILLER_PORT=44140
, default is 44134
.HELM_TILLER_PROBE_PORT=44141
, default is 44135
- requires Helm >= 2.14.configmap
by setting HELM_TILLER_STORAGE=configmap
, default is secret
.$HOME/.helm/plugins/helm-tiller/logs
by setting HELM_TILLER_LOGS=true
.HELM_TILLER_LOGS_DIR=/some_folder/tiller.logs
.HELM_TILLER_HISTORY_MAX=20
.CREATE_NAMESPACE_IF_MISSING=false
.Start Tiller with pre-set bash
shell HELM_HOST=127.0.0.1:44134
, it is handy to use locally:
helm tiller start
The default working Tiller namespace
is kube-system
, you can set another one:
helm tiller start my_tiller_namespace
Tip: You can have many Tiller namespaces, e.g. one per team, just pass the name as an argument when you starting Tiller.
In CI pipelines you do not really need pre-set bash to be opened, so you can use:
helm tiller start-ci
export HELM_HOST=127.0.0.1:44134
Then your helm
will know where to connect to Tiller and you do not need to make any changes in your CI pipelines.
And when you done stop the Tiller:
helm tiller stop
Another option for CI workflows.
Examples use of tiller run
, that starts/stops tiller
before/after the specified command:
helm tiller run helm list
helm tiller run my-tiller-namespace -- helm list
helm tiller run my-tiller-namespace -- bash -c 'echo running helm; helm list'
Handy bash
aliases for use Tillerless
locally:
alias hh="helm tiller run helm"
alias hr="helm tiller run"
alias ht="helm tiller start"
alias hts="helm tiller stop"
Examples of alias use:
# helm tiller run helm list
hh ls
# helm tiller run my-tiller-namespace -- helm list
hr my-tiller-namespace -- helm list
# helm tiller run my-tiller-namespace -- bash -c 'echo running helm; helm list'
hr my-tiller-namespace -- bash -c 'echo running helm; helm list'
To use tiller with terraform-helm-provider, use helm tiller start-ci
and set the helm provider's host to point to the locally started tiller.
$ helm tiller start-ci
provider "helm" {
host = "127.0.0.1:44134"
install_tiller = false
}
This will greatly simplify your usage of terraform-helm-provider
as there is no longer a need to create service accounts, and deploy tiller along with the problems that come with it.
While using Minikube, it is important to stop, and restart tiller after a minikube delete
and minikube start
.
$ minikube delete
$ minikube start
$ helm tiller stop
$ helm tiller start