4

I have an issue about GKE/GCE.

I'm using GKE under shared VPC(alias ip) and I have 4 machines of 2 node pools. When I try to add more node pools(because I want to have more type of machines), it keeps pending and I switched to the GCE/Instance groups tab, it says the IP space is exhausted. But I only have 4 machines in total, the ip range should be enough for 1024(10.129.16.0/22 + 10.130.16.0/22).

Does each node pool will preserve some ip? Like 512 per pool maybe? So when I tried to create more pool, it fails.

Here is a screenshot:

[gce instance group error]

enter image description here

chux0519
  • 51
  • 1
  • 1
  • 5
  • How many pods do you have in your cluster? With alias IPs in GKE, containers are assigned IPs from secondary range. Can you post output of `gcloud compute networks describe us-east1-ai-pro-secondary-129-a73f3058f217db64 --region us-east1 --project common-prod` as well. – Daniel t. Nov 09 '18 at 13:40
  • @Danielt. thank you for your reply, I actually don't have permission, so I have to ask my admin to run this command and I will give feedback as soon as possible. – chux0519 Nov 09 '18 at 14:02
  • What region was this in? Are you able to create GCE instances outside of GKE in that subnet? Are you hitting any network [quotas](https://cloud.google.com/vpc/docs/quota)? Are you able to reserve IPs in that range on their own? Is this still affecting you? – Sunny J Nov 09 '18 at 21:59
  • Thank you all guys. I just noticed that each node will preserve 256 IP, so in theory I can only have 4 node at the same time. But I can't find any doc about this. I will add a picture to prove this. So, the solution is I should contact to my leader and request more IPs. – chux0519 Nov 10 '18 at 05:18

1 Answers1

4

Just came across this error myself. The documentation is here: https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips (search for "creation failed: IP space" on that page)

If you look at the table right below it. The "Pod Cidr" space you outlined above 10.129.11.0/24 is the same as "Recommended Pod address range" (right column) in the table. You must have set the "subnet size for nodes" (left column) for your vm to /24, which would reserve 252 ip's for your one vm.

Subnet size for nodes == Alias Ip Range in the their VM creation interface. When creating a VM, click "Management, security, disks, networking, sole tenancy" -> "Networking" tab -> "Show alias IP ranges".

Set the Alias IP range to /29 and now your VM will only request 4 internal ip's.

nelsonenzo
  • 141
  • 3