Connect helm to multiple tiller in different k8s clusters

2/10/2019

I want to manage different clusters of k8s,
one called production for prod deployments,
and another one called staging other deployments and configurations.

How can I connect helm to the tiller in those 2 different clusters?
Assume that I already have tiller installed and I have a configured ci pipeline.

-- itaied
kubernetes
kubernetes-helm

1 Answer

2/10/2019

Helm will connect to the same cluster that kubectl is pointing to.

By setting multiple kubectl contexts and changing them with kubectl config use-context [environment] you can achieve what you want.

Of course you will need to set appropriate HELM_ environment values in your shell for each cluster including TLS certificates if you have them enabled.

Also it’s worth taking steps so that you don’t accidentally deploy to the wrong cluster by mistake.

-- Paul Annetts
Source: StackOverflow