Open KR411-prog opened 2 years ago
After running the uninstall script in Kubesphere host cluster, I find the below resources not deleted.
kubectl api-resources --verbs=list --namespaced -o name | grep -v event | xargs -n 1 kubectl get --show-kind --ignore-not-found -n "kube-federation-system" NAME AGE federatedtypeconfig.core.kubefed.io/applications.app.k8s.io 17d federatedtypeconfig.core.kubefed.io/clusterrolebindings.rbac.authorization.k8s.io 17d federatedtypeconfig.core.kubefed.io/clusterroles.rbac.authorization.k8s.io 17d federatedtypeconfig.core.kubefed.io/configmaps 17d federatedtypeconfig.core.kubefed.io/configs.notification.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/deployments.apps 17d federatedtypeconfig.core.kubefed.io/globalrolebindings.iam.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/globalroles.iam.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/groupbindings.iam.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/groups.iam.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/ingresses.networking.k8s.io 17d federatedtypeconfig.core.kubefed.io/jobs.batch 17d federatedtypeconfig.core.kubefed.io/limitranges 17d federatedtypeconfig.core.kubefed.io/namespaces 17d federatedtypeconfig.core.kubefed.io/persistentvolumeclaims 17d federatedtypeconfig.core.kubefed.io/receivers.notification.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/replicasets.apps 17d federatedtypeconfig.core.kubefed.io/secrets 17d federatedtypeconfig.core.kubefed.io/serviceaccounts 17d federatedtypeconfig.core.kubefed.io/services 17d federatedtypeconfig.core.kubefed.io/statefulsets.apps 17d federatedtypeconfig.core.kubefed.io/users.iam.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/workspacerolebindings.iam.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/workspaceroles.iam.kubesphere.io 17d federatedtypeconfig.core.kubefed.io/workspaces.tenant.kubesphere.io 17d Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
I tried to delete them one after the other but its getting stuck in deletion. kubectl delete federatedtypeconfig.core.kubefed.io/applications.app.k8s.io -n kube-federation-system - is stuck in deletion
kubectl describe federatedtypeconfig.core.kubefed.io/applications.app.k8s.io -n kube-federation-system
Name: applications.app.k8s.io
Namespace: kube-federation-system
Labels:
Kubesphere uninstall script has to be improved. https://github.com/kubesphere/ks-installer/blob/master/scripts/kubesphere-delete.sh
when I tried to run uninstall on Kubesphere host cluster, it is stuck in Kube-federation-system with terminating status. And I have to manually clean up by removing finalizers.
kubectl get namespaces
NAME STATUS AGE
add-ons Active 17d
apicentral Active 17d
default Active 17d
kube-federation-system Terminating 101m
This does not seem to happen in member cluster
Ideally helm uninstall should be able to remove all the resources deployed in Kubesphere. But it only deletes crd clusterconfiguration. So we have to run this script manually for uninstall.