kubesphere / ks-installer

Install KubeSphere on existing Kubernetes cluster
https://kubesphere.io
Apache License 2.0
533 stars 746 forks source link

kubesphere-delete.sh too slow #1905

Open willzhang opened 2 years ago

willzhang commented 2 years ago

it's a empty cluster ,but run kubesphere-delete.sh need two hours and never finished ,and always hang.

why it so slow to delete a cluster?

it will state customresourcedefinition.apiextensions.k8s.io "fluentbits.logging.kubesphere.io" deleted and never finished

[root@Ops-repo kubesphere]# sh kubesphere-delete.sh
Note:
Delete the KubeSphere cluster, including the module kubesphere-system kubesphere-devops-system kubesphere-devops-worker kubesphere-monitoring-system kubesphere-logging-system openpitrix-system.
Please reconfirm that you want to delete the KubeSphere cluster.  (yes/no) yes
error: the server doesn't have a resource type "cc"
label "kubesphere.io/workspace" not found.
namespace/default not labeled
label "kubesphere.io/namespace" not found.
namespace/default not labeled
namespace/default patched (no change)
label "kubesphere.io/workspace" not found.
namespace/istio-system not labeled
label "kubesphere.io/namespace" not found.
namespace/istio-system not labeled
namespace/istio-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kube-node-lease not labeled
label "kubesphere.io/namespace" not found.
namespace/kube-node-lease not labeled
namespace/kube-node-lease patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kube-public not labeled
label "kubesphere.io/namespace" not found.
namespace/kube-public not labeled
namespace/kube-public patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kube-system not labeled
label "kubesphere.io/namespace" not found.
namespace/kube-system not labeled
namespace/kube-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kubekey-system not labeled
label "kubesphere.io/namespace" not found.
namespace/kubekey-system not labeled
namespace/kubekey-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kubesphere-controls-system not labeled
label "kubesphere.io/namespace" not found.
namespace/kubesphere-controls-system not labeled
namespace/kubesphere-controls-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kubesphere-devops-system not labeled
label "kubesphere.io/namespace" not found.
namespace/kubesphere-devops-system not labeled
namespace/kubesphere-devops-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kubesphere-logging-system not labeled
label "kubesphere.io/namespace" not found.
namespace/kubesphere-logging-system not labeled
namespace/kubesphere-logging-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kubesphere-monitoring-federated not labeled
label "kubesphere.io/namespace" not found.
namespace/kubesphere-monitoring-federated not labeled
namespace/kubesphere-monitoring-federated patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kubesphere-monitoring-system not labeled
label "kubesphere.io/namespace" not found.
namespace/kubesphere-monitoring-system not labeled
namespace/kubesphere-monitoring-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/kubesphere-system not labeled
label "kubesphere.io/namespace" not found.
namespace/kubesphere-system not labeled
namespace/kubesphere-system patched (no change)
label "kubesphere.io/workspace" not found.
namespace/rook-ceph not labeled
label "kubesphere.io/namespace" not found.
namespace/rook-ceph not labeled
namespace/rook-ceph patched (no change)
error: the server doesn't have a resource type "clusters"
No resources found
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
s2ibuildertemplate.devops.kubesphere.io/java patched (no change)
s2ibuildertemplate.devops.kubesphere.io/nodejs patched (no change)
s2ibuildertemplate.devops.kubesphere.io/python patched (no change)
s2ibuildertemplate.devops.kubesphere.io/tomcat patched (no change)
No resources found
No resources found
No resources found
No resources found
No resources found
No resources found
No resources found
error: the server doesn't have a resource type "federatednamespaces"
customresourcedefinition.apiextensions.k8s.io "fluentbits.logging.kubesphere.io" deleted
Level1Accelerator commented 2 years ago

+1

fdsaggaw commented 2 years ago

+1

xiaoping378 commented 2 years ago

卡住的crd资源,需要手动patch finalizers下

kubectl -n kubesphere-logging-system patch fluentbits.logging.kubesphere.io fluent-bit -p '{"metadata":{"finalizers":null}}' --type=merge