I deployed a private GKE cluster, I got external HTTP(s) load balancers working with ingress resources including global external static ip addresses, but when it comes to External TCP load balancers with an external/regional IP address the service is stuck on “Ensuring load balancer” and no load balancer resources are shown in GCP.
Based from the error or message saying “Ensuring load balancer”, external IP of the Load Balancer is stuck as Pending.
Here’s what you can do, test with a regional external IPv4 address in the same region as the cluster. This is discussed in the About LoadBalancer Service parameters document. Allocate a new Regional IP and update the Service loadBalancerIP to the new IP address and it will attach to the new IP address.
The finalizer is probably stuck in a bad state from a multi-year-long bug related to race conditions, you’d need to kubectl patch to fix the state then manually delete. https://kubernetes.io/docs/concepts/overview/working-with-objects/finalizers/
^-- Finalizers are responsible for garbage collection / auto deletion of auto provisioned resources. Sometimes they get stuck. As long as you verify the resource got deleted or manually delete it to prevent orphaned cloud resources, it should be safe to delete a finalizer and manually delete.
https://github.com/kubernetes/kubernetes/issues/39420#issuecomment-546781470
^-- makes it seem like there’s a few race condition type bugs that can leave a service stuck in deleting. / put service controller in a confused state. (like a delete and update operation occur at same time) or delete can’t succeed because already deleted. And a finalizer never gets updated/removed due to stuck inconsistent state due to race condition bug.
enable kube controller manager logs (to see service manager logs), might tell you why it’s stuck. (like can’t delete because already deleted) (or an update and delete happened at the same time and both operations block each other.)
If logs don’t help, or you’ve confirmed the GCP LB has been deleted, you should be safe to patch the finalizer to null value, and manually delete.