I am using the Gitlab Auto DevOps CI pipeline and I want to remove a deployment using helm.
I try to connect to tiller like this helm init --client-only --tiller-namespace=gitlab-managed-apps
which results in
$HELM_HOME has been configured at /Users/marvin/.helm. Not installing Tiller due to 'client-only' flag having been set Happy Helming!
helm list --namespace=gitlab-managed-apps
returns Error: could not find tiller
I had the same problem. I've found the solution to list releases here : https://forum.gitlab.com/t/orphaned-apps-in-gitlab-managed-apps-namespace/22717/9
export TILLER_NAMESPACE="gitlab-managed-apps"
kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['ca\.crt']}" | base64 --decode > tiller-ca.crt
kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['tls\.crt']}" | base64 --decode > tiller.crt
kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['tls\.key']}" | base64 --decode > tiller.key
helm list --tiller-connection-timeout 30 --tls --tls-ca-cert tiller-ca.crt --tls-cert tiller.crt --tls-key tiller.key --all --tiller-namespace gitlab-managed-apps
You can then run :
helm delete <name> [--purge] --tiller-connection-timeout 30 --tls --tls-ca-cert tiller-ca.crt --tls-cert tiller.crt --tls-key tiller.key --tiller-namespace gitlab-managed-apps
Edit:
@mrvnklm proposed to use -D options for base64. In my case, it doesn't work anymore with "d" uppercased. After checks, I guess it's for macOs users(man page base64 osx). For linux, it seems to be "-d" (man page linux). Changed to "--decode" according to mrvnklm's comment.
As you did a "client-only" helm --init
, helm doesn't know how to find the correct tiller
instance.
You need to specify where the tiller is in your subsequent calls to helm list
.
This is touched upon in the helm install documentation here. You will either need to set HELM_HOST
environment variable, or add --host
to every call. You will also need to specify (and have access to) any TLS certificates used to make the Gitlab Auto DevOps connection.