Home > OS >  GKE Autopilot failing to create new deployment after 10-12 deployments saying "Insufficient CPU
GKE Autopilot failing to create new deployment after 10-12 deployments saying "Insufficient CPU

Time:02-11

I am having some issue with GKE(autopilot).

I am deploying statefulsets and for each statefulset I deploy a service with public IP. But after deploying like 10-12 statefulsets, if I try deploying any new it remains red(Unschedulable) with message "Insufficient cpu".

When I go to cluster section is show a different message saying:

Can’t scale up because instances in managed instance groups hosting node pools ran out of IPs

Image of error: https://i.imgur.com/t8I4Yij.png

I am new to GKE and tried doing what suggested in links of those image but it seems most of steps give error saying its not supported in autopilot mode.

Any help/suggestion is appreciated.

Thanks.

CodePudding user response:

If you are on GKE autopilot ideally it will create the new nodes in cluster if out of CPU or no space left to schedule the PODs.

However if it's issue of IP you can read more : https://cloud.google.com/kubernetes-engine/docs/how-to/alias-ips#not_enough_space

Cluster autoscaler might not have enough unallocated IP address space to use to add new nodes or Pods, resulting in scale-up failures, which are indicated by eventResult events with the reason scale.up.error.ip.space.exhausted. You can add more IP addresses for nodes by expanding the primary subnet, or add new IP addresses for Pods using discontiguous multi-Pod CIDR. For more information, see Not enough free IP space for Pods.

but you are on autopilot so wont be able to access underlaying subnet and node pools of cluster maybe.

CodePudding user response:

Unfortunately, the only option at this point is to create a new cluster and make sure that the CIDR ranges you assign to the cluster have enough available IPs for the number of nodes you believe you'll need. The default setting for Autopilot should be enough.

  • Related