Ryan
Ryan

Reputation: 552

Helm stuck in PENDING_INSTALL

I can't get out of this state: PENDING_INSTALL. This is causing terraform to fail to deploy. Is there any way out of this without deleting?

# helm status core-api
LAST DEPLOYED: Mon Jul 15 14:35:21 2019
NAMESPACE: master
STATUS: PENDING_INSTALL

RESOURCES:
==> v1/Deployment
NAME      READY  UP-TO-DATE  AVAILABLE  AGE
core-api  2/2    2           2          2d1h

==> v1/Pod(related)
NAME                       READY  STATUS   RESTARTS  AGE
core-api-5744cb4c68-fjd6f  1/1    Running  0         3h43m
core-api-5744cb4c68-mwgsw  1/1    Running  0         3h18m

==> v1/Service
NAME      TYPE          CLUSTER-IP      EXTERNAL-IP       PORT(S)                     AGE
core-api  LoadBalancer  x.x.x.x  a4d81902ea72f...  80:31404/TCP,443:32035/TCP  2d1h

Upvotes: 12

Views: 35534

Answers (2)

Montralis
Montralis

Reputation: 1

Although this is not a complete solution, it can be useful to install the Helm Chart on a trial basis, especially for initzial installations. The --debug and --timeout flags can be useful here. You can use these to test and control whether your chart works and how long it takes to install. Check the docu.

After you have successfully installed the chart this way, you can upgrade it or install it again without the flags. as long as nothing has changed in your infrastructure, you should not have any problems reinstalling it

Upvotes: 0

Tux
Tux

Reputation: 2075

If you have previous releases of this chart you can rollback to the last working release with no downtime and the problem is immediatelly fixed.

❯ helm history [your chart]
(...)

50              Thu Oct  1 11:42:33 2020        SUPERSEDED      -core-0.2.13                  Upgrade complete 
51              Wed Oct  7 23:08:01 2020        SUPERSEDED      -core-0.2.13                  Upgrade complete 
52              Tue Oct 20 13:03:04 2020        SUPERSEDED      -core-0.2.13                  Upgrade complete 
53              Wed Nov 18 11:36:13 2020        DEPLOYED        -core-0.2.13                  Upgrade complete 
54              Thu Nov 19 09:57:24 2020        PENDING_UPGRADE -core-0.2.13                  Preparing upgrade

❯ helm rollback -core-cmd 53
Rollback was a success.

❯ helm history -core-cmd        
REVISION        UPDATED                         STATUS          CHART           APP VERSION     DESCRIPTION      
1               Thu Mar  8 16:57:00 2018        SUPERSEDED      -core-0.1.0                   Install complete 
2               Thu Mar  8 18:05:37 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
3               Mon Mar 12 13:04:09 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
4               Wed Mar 28 13:36:14 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
5               Mon Apr  9 11:28:25 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
6               Tue May 15 13:40:46 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
7               Fri Jul  6 12:27:19 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
8               Mon Jul  9 15:59:49 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
9               Mon Jul  9 16:50:29 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
10              Wed Jul 11 17:00:32 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
11              Thu Jul 12 06:39:28 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
12              Tue Jul 17 13:24:16 2018        SUPERSEDED      -core-0.2.0                   Upgrade complete 
13              Fri Sep 14 13:52:57 2018        SUPERSEDED      -core-0.2.0                                    
(...)
54              Thu Nov 19 09:57:24 2020        SUPERSEDED      -core-0.2.13                  Preparing upgrade
55              Mon Nov 23 12:28:35 2020        DEPLOYED        -core-0.2.13                  Rollback to 53

   

Now you can continue working normally with the chart.

Upvotes: 1

Related Questions