I have a GKE cluster with two node pools. In this cluster, I am using only one subnetwork (US) with the range 10.100.100.0/24, and all 254 IP addresses are in use because I am also using this subnetwork for VMs along with Kubernetes.
I need to create new node pools, but I receive an error because of the exhausted IP addresses.
us-central1-a: Requested resource is exhausted: Not all instances running in IGM after 58.156203563s. Expected 2, running 0, transitioning 2. Current errors: [IP_SPACE_EXHAUSTED]: Instance 'gke-us-xxx-38de9507-wxwr' creation failed: IP space of 'projects/xxx-yyy/regions/us-central1/subnetworks/us' is exhausted. .; us-central1-b: Requested resource is exhausted: Not all instances running in IGM after 44.519059343s. Expected 2, running 0, transitioning 2. Current errors: [IP_SPACE_EXHAUSTED]: Instance 'gke-us-xxx-4f57c3c6-6zq4' creation failed: IP space of 'projects/xxx-yyy/regions/us-central1/subnetworks/us' is exhausted.
I can’t recreate this cluster with a new, bigger subnetwork because it is in production already.
I want to create a new subnetwork, like US2 with the range 10.100.101.0/24, and use it for the new node pools, but i didn’t find how to pass different to the new node pools. I am using Terraform with the ‘google_container_node_pool’ resource
I thought to use ‘additional_node_network_configs’ in ‘network_config’ but this is really additional subnetwork, not replacing old one