Skip to content

Max Pods Calculator Kaizen #953

@o6uoq

Description

@o6uoq

AWS EKS has the notion of calculating ENIs per Instance, which once calculated, provide you with the number of Pods which can be run per Instance.

Mapping is calculated from AWS EC2 API using the following formula:

  • First IP on each ENI is not used for pods
  • +2 for the pods that use host-networking (AWS CNI and kube-proxy)

Number (#) of ENI * (# of IPv4 per ENI - 1) + 2

👉🏼 https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI

max-pods-calculator.sh helps as a Max Pod Calculator, however, it calculates on a binary outcome e.g. two outcomes: (1) MAX_POD_CEILING_FOR_LOW_CPU and (2) MAX_POD_CEILING_FOR_HIGH_CPU, which is based on if the CPU_COUNT is higher or lower than 30.

What would you like to be added:

  • ENI and IP calculation takes into account when using Pod Security Groups
  • Example use cases and support for Pod Security Group users/customers
  • Max Pods can be overridden explicitly

Why is this needed:

The calculation does not take into account two things:

  1. ENI / IP calculation when using Pod Security Groups
  2. Ability to override MAX_POD_* given a explicit setting (existing PR somewhat related)

It is needed so that all AWS EKS customers, whether they use Pod Security Groups or not, have feature parity in the use of this script to provide the most accurate output of ENI, IP and CPU allocation based on the subjective use of AWS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions