why does kops keeps almost half the CIDR unused while creating k8s cluster?

12/29/2017

Kops assigns 1/8 th of the CIDR to its private subnets each, and 1/64 th of the CIDR to its utility subnets.

If we create a multi AZ cluster with 1024 IPs having three zones, private Subnets would cover 1/8*1024*3 = 384 IPs utility subnets would cover 1/64*1024*3 = 48 IPs. which is 432 combined.

  • which is more or less half of 1024. Why are so many IPs left unused?
  • Why does kops distributes IPs this way? (1/8 the of the CIDR to private subnets in each AZ).
-- chandan
cidr
kops
kubernetes

1 Answer

1/3/2018

Because kops is used with many different types of workloads, it comes with defaults, but allows you to configure the subnets as you desire. Using kops edit cluster you can edit the cidr attribute on each of the subnes in spec.subnets to whatever you'd like them to be.

-- coreypobrien
Source: StackOverflow