aws / amazon-vpc-cni-k8s

Networking plugin repository for pod networking in Kubernetes using Elastic Network Interfaces on AWS
Apache License 2.0
2.28k stars 743 forks source link

Add metrics on the amount of allocated IPs/ENIs/Networks per CNI container #3075

Open migueleliasweb opened 1 month ago

migueleliasweb commented 1 month ago

What would you like to be added:

Metrics to the amount of allocated IPs/ENIs/Networks per CNI container. This is critical for users to foresee upcoming IP exhaustion issues on their VPCs and Subnets.

Why is this needed:

Currently, the AWS provides the amount of Available IPv4 addresses in their subnet page but the count is not a live number and only updates at a certain frequency. Sometimes, users with bigger clusters, might think they have loads of IPs available but under the hood the VPC CNI is throwing errors due to IP allocations on certain subnets.

orsenthil commented 2 weeks ago

Hello @migueleliasweb,the CNI metrics helper plugin https://github.com/aws/amazon-vpc-cni-k8s/tree/master/charts/cni-metrics-helper provides all these details. Have you tried installing this plugin and setting this up?

migueleliasweb commented 2 weeks ago

Hi @orsenthil , I wasn't aware of this helper. I'll definitely be trying to deploy it and report back with some findings. Thank you heaps!