It takes two minutes to delete GKE node pools. Are there any ways of speeding that up?
Currently I just (using the container Go SDK):
import (
container "cloud.google.com/go/container/apiv1"
)
containerClient, _ := container.NewClusterManagerClient(context.Background())
op, _ := containerClient.DeleteNodePool(context.Background(), &containerpb.DeleteNodePoolRequest{
Name: "projects/my-project/locations/my-zone/clusters/my-cluster/nodePools/my-pool",
})
and wait for op
to finish.
I am not aware of any faster ways to do that. You could skip waiting for the deletion to complete and do something else in the meanwhile, but that wouldn't make the deletion itself any faster. When deleting many pools they can issue deletion requests for all the pools and then wait for them all to finish.