GCP – Announcing multi-subnet support for more scalable GKE clusters
We are pleased to announce the preview of multi-subnet support for Google Kubernetes Engine (GKE) clusters. This enhancement removes single-subnet limitations, increasing scalability, optimizing resource utilization, and enhancing flexibility of your GKE clusters.
Multi-subnet support for GKE clusters allows you to add additional subnets to an existing GKE cluster, which can then be utilized by new node pools. This functionality is supported for all clusters, using GKE version 1.30.3-gke.1211000 or greater.
Benefits
- Increased scalability: Clusters can now scale beyond the limits of a single subnets primary IP range.
- Optimized resource utilization: IP addresses can be allocated more efficiently across multiple subnets, which reduces IP waste.
- Enhanced flexibility: Adding subnets provides more flexibility in managing IP ranges for pods and services. Subnets can be updated without recreating the cluster so you can easily expand beyond initial cluster configurations.
Use case: Node IP exhaustion
Historically, GKE clusters are created on a single subnet, using its primary IP range. Once all the IPs in the primary range are used, the cluster can no longer add more nodes, and hence cannot expand or autoscale.
The IP exhaustion errors look something like this:
- code_block
- <ListValue: [StructValue([(‘code’, “[IP_SPACE_EXHAUSTED_WITH_DETAILS]: Instance ‘gke-cluster1-default-pool-45c508b2-2jqt’ creation failed: IP space of ‘projects/my-project/regions/us-west1/subnetworks/my-subnet1’ is exhausted.”), (‘language’, ”), (‘caption’, <wagtail.rich_text.RichText object at 0x7fc8e4f048b0>)])]>
To fix this error, we can now use the new multi-subnet feature to add subnets to the cluster. New node pools can use the new subnet and continue to grow the cluster. You can add multiple secondary ranges in the new subnets, in addition to the existing ability to add additional pod ranges to the default subnet. GKE will automatically pick a subnet during node pool creation based on the IP availability in the subnets.
Getting started
To take control of your GKE cluster’s growth, try adding subnets on-demand and scale fearlessly. Use your preferred method to start using multi-subnet support today!
- CLI: For a complete list of CLI commands and options, check out the documentation.
- API: To learn more about how to use the API, check the API documentation.
- Terraform and UI support are coming soon!
Read More for the details.