I am running multiple GKE Clusters on Google Cloud behind a multi-cluster ingress the setup of which took some tinkering.
That being said by the time I got it sorted out I had used up my 5 subnets specifically on the us-east1 region. I don't need more than 5 but... apparently deleting a Cluster does NOT also delete the Subnet that was created with it.
Therefore — I need to manually delete the unused subnets, and to do that I need to know the subnet names.
My issue is that I can't find any where in GCP's docs that describes what the name of a subnet will be after being created with a new GKE Cluster (where the subnet name is not specified).
What would the Subnet Name be with the following Create Cluster command (for example):
gcloud container clusters create example-cluster --num-nodes=1 --region us-east1-c \
--machine-type g1-small \
--enable-ip-alias --cluster-ipv4-cidr=10.2.0.0/21 \
--services-ipv4-cidr=10.6.0.0/19
The following gcloud Subnet docs (https://cloud.google.com/vpc/docs/configure-alias-ip-ranges) described how to list the subnets — but on running:
gcloud compute networks list
I get only the default response:
NAME SUBNET_MODE BGP_ROUTING_MODE IPV4_RANGE
default AUTO REGIONAL
I know that there are multiple subnets created within this region because attempting to create another one (with new cluster) gives me the following error:
'Retry budget exhausted (5 attempts): Google Compute Engine: Exceeded maximum supported number of secondary ranges per subnetwork: 5.' endTime: u'2019-01-10T22:16:14.496871616Z'
I am open to additional solutions that allow me to properly list all subnets in a region BUT my question is how does GKE name a Subnet that is created without a name?