I tried to run a Helm upgrade before running helm repo update
and now it seems to be permanently stuck in "STATUS: pending-upgrade" and won't let me try to run the upgrade again.
Trying to run:
helm upgrade --namespace coder --install --force --atomic --wait --version 1.13.2 --values ./coder.yaml coder coder/coder
outputs: Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
There is no way of stopping it without restarting helm-controller with kubectl -n flux-system delete po helm-controller-xxxx . Please create an issue for this feature request in the https://github.com/fluxcd/helm-controller repository.
This error can happen for few reasons, but it most commonly occurs when there is an interruption during the upgrade/install process as you already mentioned. To fix this one may need to, first rollback to another version, then reinstall or helm upgrade again.
If you need to uninstall the deployed release, run the delete command on the Helm command line. The command removes all the Kubernetes components that are associated with the chart and deletes the release.
GitLab Kubernetes integration error; configuration of Helm Tiller already exists 7 Helm install or upgrade release failed on Kubernetes cluster: the server could not find the requested resource or UPGRADE FAILED: no deployed releases 3 Error: validation failed: unable to recognize "": no matches for kind "Deployment" in version "" 95
You are deploying resources (pods, service and deployments etc) in Kubernetes cluster using Helm charts. This is deployed by release pipeline in Azure DevOps. In the Release pipeline you start getting errors like below and the task fails to deploy the resources. This started happening for Helm chart versions 3.3.0 and later.
6 GitLab Kubernetes integration error; configuration of Helm Tiller already exists 7 Helm install or upgrade release failed on Kubernetes cluster: the server could not find the requested resource or UPGRADE FAILED: no deployed releases 3 Error: validation failed: unable to recognize "": no matches for kind "Deployment" in version "" 95
This is the reason why updates seem to occur in a non consistent fashion. Refer to #5473 (comment) for an example of a pod issue. Helm does not support 3-way merge and therefore if changes are made directly to the cluster, they will not be picked up on an upgrade.
TLDR: You need to rollback to another version first and then helm upgrade
again:
helm rollback <release> <revision> --namespace <namespace>
This can happen for a few reasons, but it ultimately occurs when there's an interruption during the upgrade/install process. Commonly, you SIGKILL
(Ctrl C
) while the deployment is ongoing.
You'll notice that if you helm ls --namespace <namespace>
while it's stuck in STATUS: pending-upgrade
state, you'll see the following without any other information:
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
The best workaround currently is to rollback to another version, and then helm upgrade
again:
helm rollback <release> <revision> --namespace <namespace>
revision
is optional, but you should try to provide it.
more resources:
This solution worked for me:
kubectl get secrets
kubectl delete secret sh.helm.release.v1.<RELEASE_NAME>.v<LATEST_REVISION>
Following the resolution described in this issue
In case is useful to someone, and in response to explicitsoul's comment, what fixed it to me was just:
helm delete <release> -n <namespace>
That removed the pending install (in my case, the first one so I hadn't a previous release to rollback to) and then I was able to run the install again.
What caused the stuck process in my case was a CTRL-C canceling the install command, so don't do that.
Here is what worked for me
helm list --all
This will list all the releases with their statusNAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
rel1 default 1 2021-06-04 14:15:37.652066 +0530 IST deployed rel1-3.32.0 0.46.0
rel2 default 29 2021-06-18 11:02:38.779801 +0530 IST pending-upgrade rel2-0.0.1
rel3 default 3 2021-06-17 11:27:14.608042 +0530 IST deployed rel3-0.0.1
helm rollback rel2 28 --namespace default
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
rel1 default 1 2021-06-04 14:15:37.652066 +0530 IST deployed rel1-3.32.0 0.46.0
rel2 default 30 2021-06-18 11:26:07.555547 +0530 IST deployed rel2-0.0.1
rel3 default 3 2021-06-17 11:27:14.608042 +0530 IST deployed rel3-0.0.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With