头盔陷入PENDING_INSTALL

时间:2019-07-17 20:51:42

标签: kubernetes-helm

我无法摆脱这种状态:PENDING_INSTALL。这导致terraform无法部署。有什么办法可以删除而不删除?

# 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

1 个答案:

答案 0 :(得分:1)

如果您具有该图表的先前版本,则可以无中断地回滚到上一个工作版本,并且该问题会立即得到解决。

❯ 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

   

现在您可以继续正常使用图表了。