One of my GKE clusters is running out of IPs for Services. It was originally created with the default service address range (10.0.0.0/20), and we are about to hit the 4k services mark.
Is there a way to expand the service address range of an existing GKE cluster? The cluster's subnet has enough space to allocate more IPs, but I haven't found an API or command to change it.
https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips#cluster_sizing_secondary_range_svcs mentions that editing the secondary range is not possible while it's in use. Is there a way to replace it, and let GKE roll the IPs of the services?
Unfortunately, there is no possibility to change the IP service range
after the cluster was created in a GKE
cluster.
There is a message in creation process of GKE
cluster:
As you can see this setting is permanent.
The official documentation that you linked points:
Because this is also a subnet secondary IP range, you can only replace it when no Google Cloud resources use it. This range cannot be changed as long as a cluster uses it for Services (cluster IP addresses).
-- Cloud.google.com: Kubernetes Engine: Cluster sizing secondary range svcs
It is actively used by your GKE
cluster. Even if you try to go associated VPC to change it will be greyed out as shown below:
Please let me know if you have any questions in that.