Can't delete kubernetes cluster

I created a cluster for my project, however I think something went wrong and now I can’t do anything, ie install apps, change the cluster name, and it seems like I can’t even remove the cluster from my project.

  • I can reach the Remove Integrations and Resources modal, and I can even type in the project name to delete the cluster, and a confirmation message even pops up:


    image

  • However, the cluster is still listed in the interface and I can’t create another cluster to replace the one that I presumably just deleted:
    image

  • Looking at the GCP dashboard, the corresponding resources seems to have been deleted or not even been created in the first place:
    image

I’m not sure if I still need to wait longer for the GitLab cluster to be deleted, but I have no indication that I need to wait, and I’m not even sure if my deletion request has even been received.

1 Like

Did you manage to solve this?

1 Like

Hi… I was facing the same issue. Now it’s working for me.
Try using “Remove Integration” button, not “Remove Integration and Resources” button.
For some reason “Remove Integration” button actually works to remove the Kubernetes cluster from the list. Please find attached screenshots.

Thanks!

I integrated a GKE cluster and used GitLab’s web GUI to install several apps at the end of 2019. Since GUI installed apps are being deprecated in GitLab 14 I’m in the middle of uninstalling my apps, tearing out the project cluster GitLab integration, re-adding the cluster as a Group cluster, and configuring a Cluster Management project.

@arunsah 's answer helped me remove the integration from the UI, but on my cluster, I still had some leftover resources from previously installed applications.

I’m going to manually remove the rest of the resources in the gitlab-managed-apps namespace before re-adding my cluster to gitlab.

Example leftover resources

kubectl get all,secret -n gitlab-managed-apps
NAME                                                         READY   STATUS    RESTARTS   AGE
pod/ingress-nginx-ingress-controller-f7bdf6c94-pcm2q         1/1     Running   0          5d
pod/ingress-nginx-ingress-default-backend-76cb88865d-sxkzl   1/1     Running   0          5d
pod/prometheus-kube-state-metrics-6958b68c64-4nc8k           1/1     Running   0          5d
pod/prometheus-prometheus-server-774df84bb6-rfz2w            2/2     Running   0          5d

NAME                                                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/ingress-nginx-ingress-controller        1/1     1            1           645d
deployment.apps/ingress-nginx-ingress-default-backend   1/1     1            1           645d
deployment.apps/prometheus-kube-state-metrics           1/1     1            1           608d
deployment.apps/prometheus-prometheus-server            1/1     1            1           608d

NAME                                                               DESIRED   CURRENT   READY   AGE
replicaset.apps/ingress-nginx-ingress-controller-f7bdf6c94         1         1         1       645d
replicaset.apps/ingress-nginx-ingress-default-backend-76cb88865d   1         1         1       645d
replicaset.apps/prometheus-kube-state-metrics-6958b68c64           1         1         1       608d
replicaset.apps/prometheus-prometheus-server-774df84bb6            1         1         1       608d

NAME                                                        TYPE                                  DATA   AGE
secret/certmanager-webhook-ca                               kubernetes.io/tls                     3      512d
secret/certmanager-webhook-webhook-tls                      kubernetes.io/tls                     3      512d
secret/default-token-kjn4m                                  kubernetes.io/service-account-token   3      645d
secret/letsencrypt-production-key                           Opaque                                1      512d
secret/runner-d62sxlpb-project-10509056-concurrent-0k8lnh   kubernetes.io/dockercfg               1      105d
secret/tiller-token-4x2nw                                   kubernetes.io/service-account-token   3      33d
secret/tiller-token-7t6dq                                   kubernetes.io/service-account-token   3      33d
secret/tiller-token-bxr8t                                   kubernetes.io/service-account-token   3      33d
secret/tiller-token-kvqsq                                   kubernetes.io/service-account-token   3      33d
secret/tiller-token-qbf5c                                   kubernetes.io/service-account-token   3      33d
secret/tiller-token-rb5xf                                   kubernetes.io/service-account-token   3      645d
secret/tiller-token-zw4nm                                   kubernetes.io/service-account-token   3      33d

I also had this issue when my cluster could connect, I only tried to button which should do both. When it was able to connect I could remove them properly