头盔卡在 PENDING_INSTALL

问题描述 投票:0回答:2

我无法摆脱这种状态:

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
kubernetes-helm
2个回答
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

   

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


0
投票

虽然这不是一个完整的解决方案,但试用安装 Helm Chart 可能很有用,特别是对于初始安装。

--debug
--timeout
标志在这里很有用。您可以使用它们来测试和控制图表是否有效以及安装所需的时间。检查文档

以这种方式成功安装图表后,您可以升级它或再次安装它,而无需标记。只要您的基础设施没有发生任何变化,重新安装它就不会有任何问题

© www.soinside.com 2019 - 2024. All rights reserved.