Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete karmada-cluster with all methods 删除impersonator后无法删除和恢复集群 #5564

Open
15927561940 opened this issue Sep 18, 2024 · 1 comment

Comments

@15927561940
Copy link

15927561940 commented Sep 18, 2024

Task description: 当我不小心删除一个集群得karmada-impersonator得secrets文件时,我发现无法再从karma管理界面中把这个集群下线,我尝试过三种方法,都不可以删除,(当然首次删除可能能成功,再次添加到集群后在此删除会hanging住)
image

集群信息:karmada-1.7
安装方式helm
管理方式push
k8s版本1.22腾讯云
说明:未删除之前是好用的

详细说明
下面分别说一下:
1.第一种情况:直接删除:

[root@172-21-15-10 cnbj-tencent-test-luna.bak]# ^C
[root@172-21-15-10 cnbj-tencent-test-luna.bak]# karmadactl-get 
NAME                             VERSION          MODE   READY   AGE
cnbj-ghxw-prod-default           v1.16.6          Push   True    77d
cnbj-ghxw-prod-istio             v1.18.14         Push   True    77d
cnbj-pt-test-istio               v1.18.14         Push   True    77d
cnbj-sjhl-yz-prod-default        v1.12.3          Push   True    77d
cnbj-sjhl-yz-prod-istio          v1.18.14         Push   True    77d
cnbj-sjhl-yz-test-old            v1.12.3          Push   True    77d
cnbj-tencent-prod-karmada-host   v1.22.5-tke.24   Push   True    71d
cnbj-tencent-prod-mercury        v1.22.5-tke.25   Push   True    62d
cnbj-tencent-prod-venus          v1.18.4-tke.8    Push   True    61d
cnbj-tencent-test-luna           v1.22.5-tke.25   Push   False   6h31m
cnhk-tencent-prod-pluto          v1.18.4-tke.43   Push   True    57d
[root@172-21-15-10 cnbj-tencent-test-luna.bak]# kubectl    --kubeconfig=/etc/karmada/karmada-apiserver.config   delete  clusters  cnbj-tencent-test-luna  --v 9

企业微信截图_17266601316783

2.第二种方式.使用unjoin删除,显示超时,改成wait=3m也无济于事

[root@172-21-15-10 cnbj-tencent-test-luna.bak]# karmadactl  --kubeconfig /etc/karmada/karmada-apiserver.config unjoin  cnbj-tencent-test-luna  --force 
I0918 19:52:59.753111   27125 unjoin.go:251] Waiting for the cluster object cnbj-tencent-test-luna to be deleted
I0918 19:53:00.753937   27125 unjoin.go:251] Waiting for the cluster object cnbj-tencent-test-luna to be deleted
I0918 19:53:01.755229   27125 unjoin.go:251] Waiting for the cluster object cnbj-tencent-test-luna to be deleted
I0918 19:53:02.753376   27125 unjoin.go:251] Waiting for the cluster object cnbj-tencent-test-luna to be deleted


E0918 19:53:58.761728   27125 unjoin.go:255] Failed to delete cluster object. cluster name: cnbj-tencent-test-luna, error: timed out waiting for the condition
E0918 19:53:58.761764   27125 unjoin.go:190] Failed to delete cluster object. cluster name: cnbj-tencent-test-luna, error: timed out waiting for the condition
error: timed out waiting for the condition

image

3.第3种方式,强制编辑删除finalers,也删除不掉

[root@172-21-15-10 karmada-1.7-OK]# kubectl --kubeconfig=/etc/karmada/karmada-apiserver.config edit cluster cnbj-tencent-test-luna
A copy of your changes has been stored to "/tmp/kubectl-edit-274889862.yaml"



image
image

其他可能有用的日志
其他日志无明显报错
karmada-apiserver日志
image

Solution:

Who can join or take the task: 希望告诉我如何解决他

@15927561940 15927561940 added the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Sep 18, 2024
@15927561940 15927561940 changed the title Can't delete karmada-cluster with all methods Can't delete karmada-cluster with all methods 删除impersonator后无法删除和恢复集群 Sep 18, 2024
@RainbowMango RainbowMango removed the good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. label Sep 18, 2024
@XiShanYongYe-Chang
Copy link
Member

Hi @15927561940 谢谢你的反馈。

当你不小心删除集群上的 karmada-impersonate secret之后,我理解首先是需要恢复它(恢复操作可以是重新创建该secret,并替换掉控制面的secret信息,这也是join集群时所执行的操作),想了解下你为什么会选择直接删除集群呢?

另外,你所尝试的三种方法间是否是有相互干扰呢?

当你使用方式一直接删除Cluster对象成功后,再删除的过程中,有什么报错信息没有?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants