首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >k3s安装longhorn服务无法删除namespaces

k3s安装longhorn服务无法删除namespaces

作者头像
兜兜毛毛
发布2020-04-24 17:12:20
1.5K0
发布2020-04-24 17:12:20
举报
文章被收录于专栏:兜兜毛毛兜兜毛毛

手工安装好longhorn后发现该服务有问题,想重新安装时发现执行原来delete命令后,虽然Pod内容已删除,但命名空间的删除状态一直处于terminating状态。

> kubectl get namespaces

NAME              STATUS        AGE
kube-node-lease   Active        4d12h
default           Active        4d12h
kube-system       Active        4d12h
cattle-system     Active        2d8h
kube-public       Active        4d12h
ingress-nginx     Active        32h
longhorn-system   Terminating   59m

# 执行删除后还是一直处于等待状态
> kubectl delete namespaces longhorn-system


# 使用强制删除也是相同的问题
>kubectl delete namespaces longhorn-system --force --grace-period=0

warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
namespace "longhorn-system" force deleted
# 网上找到该命令,查到命名空间下确实还有一些引用pod还在运行
> kubectl api-resources -o name --verbs=list --namespaced | xargs -n 1 kubectl get --show-kind --ignore-not-found -n longhorn-system

AME                                  AGE
engineimage.longhorn.io/ei-e10d6bf5   55m
NAME                                                      AGE
instancemanager.longhorn.io/instance-manager-e-e1b569ed   55m
instancemanager.longhorn.io/instance-manager-r-73f4a425   55m

但是只能看到无法删除,解铃还要系铃人在官方给的github中发现有一个uninstall目录。

https://github.com/longhorn/longhorn/tree/master/uninstall

下载该文件,执行kubectl apply -f uninstall.yaml之后,longhorn-system命名空间彻底被删除。可以重新开始了。

# 重新娇艳
>kubectl delete namespaces longhorn-system --force --grace-period=0
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档