helm: [Helm 3] improper RBAC setup causes release to be stuck in `pending-install` status despite installing fine
I tried deploying a simple Go application with a Helm chart using Helm 3, running on Kubernetes. You can find the helm chart here. The application installs fine, without error and even reports a status of deployed.
sh-4.2# helm install gotemplate .
NAME: gotemplate
LAST DEPLOYED: Tue Dec 3 21:36:02 2019
NAMESPACE: che
STATUS: deployed
REVISION: 1
TEST SUITE: None
However, it does not show up in the list of releases when I run helm list. If I run helm list --all it shows up with a status of pending-install, despite the install completing fine.
sh-4.2# helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
sh-4.2# helm list --all
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
gotemplate che 1 2019-12-03 21:36:02.653465978 +0000 UTC pending-install gotemplate-0.1.0 1.0
The same Helm chart deploys fine on Helm 2.x.
Output of helm version:
sh-4.2# helm version
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}
Output of kubectl version:
sh-4.2# kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14+", GitVersion:"v1.14.6+2e5ed54", GitCommit:"2e5ed54", GitTreeState:"clean", BuildDate:"2019-10-10T22:04:13Z", GoVersion:"go1.12.8", Compiler:"gc", Platform:"linux/amd64"}
Cloud Provider/Platform (AKS, GKE, Minikube etc.): OpenShift
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 17
- Comments: 29 (4 by maintainers)
Commits related to this issue
- Recover with rollback from pending states Workaround for helm issue: https://github.com/helm/helm/issues/7139 Signed-off-by: Hasan Turken <turkenh@gmail.com> — committed to turkenh/provider-helm by turkenh 4 years ago
- Recover with rollback from pending states Workaround for helm issue: https://github.com/helm/helm/issues/7139 Signed-off-by: Hasan Turken <turkenh@gmail.com> — committed to turkenh/provider-helm by turkenh 4 years ago
- Recover with rollback from pending states Workaround for helm issue: https://github.com/helm/helm/issues/7139 Signed-off-by: Hasan Turken <turkenh@gmail.com> (cherry picked from commit a9413914cf5e5... — committed to turkenh/provider-helm by turkenh 4 years ago
This appears to have been role issues. Once I granted the
updateverb for secrets to my service account, the release was displayed properly.Could the error handling be made better? Helm reported no errors and I had no way to know that my RBAC roles were lacking
@bacongobbler, sorry for mentioning you on an old issue. We have been experiencing this problem a lot lately and I was trying to come up with a way Helm can identify it and fix itself. I was thinking about something along the lines:
pending-installstatewaitForResources(https://github.com/helm/helm/blob/master/pkg/kube/wait.go)deployed; otherwise, return a meaningful errorWould a PR with such solution be welcome?
You could try
helm rollback <release-name> <revision>which the revision is the latest revision (in my case is 1). I fixed this issue with that,I could workaround it by doing this:
helm uninstall <my-release> -n <my-release-namespace>We faced an issue with a release getting stuck in
pending-rollbackwhile all resources were finally stable. This happened since the client was not running any more on our CD system. Here is how I fixed it without uninstalling the release: https://gist.github.com/siavashs/7e3715879c0e946167749fa9a358380aFor me, a release ended up with
pending-installstatus because an installation through Terraform had an error and aborted.What I did to fix it (but be sure what you’re doing!) was to manually edit the secret
sh.helm.release...fromstatus: pending-installtostatus: deployed. Then I did a re-install/upgrade to try and get it into a known good state.@johnhofman @bacongobbler You booth can easily simulate this problem by doing the following:
1 - Try to install any chart, using the --wait flag and the default timeout, with pod resource configuration above the limits of the node to cause the pod to not be scheduled by out of resources (CPU/MEM). 2 - Before helm cmd returns an error to you, just hit Ctrl+C 3 - Now, execute helm list -n <release-namespace> --all
My question now is: is there a workaround to fix this situation? Any ideas @bacongobbler ?
Im facing this issue with nginx-ingress chart. All other charts seem to deploy fine. The pods are launched and showin as healthy.
@artazar , Did you install nginx-ingress on k8s cluster that was running locally? And how did you create the cluster - using kubeadm or some other tool ? Reason I ask, because if someone wants to create the k8s cluster from scratch using kubeadm utility On-premise and expose the ingress externally, then what needs to be done ?
we’re also faces the issue we deployed rook and we got pending-install. we can’t delete the rook and re deploy it, because it means destroying all the kubernetes cluster
Facing the same issue. Cluster installed with kubeadm 1.18.2 and using helm 3.2.0
EDIT: I’ve updated the role to add the update verb for secrets to my service account but it had no impact: