Skip to content

alb.ingress.kubernetes.io/inbound-cidrs to automatically split to multiple sgs #4789

@Fran-Rg

Description

@Fran-Rg

Describe the feature you are requesting
We were heavily using the annotation alb.ingress.kubernetes.io/inbound-cidrs, listing more than 30 IPs, but started to get:

Failed deploy model due to operation error EC2: AuthorizeSecurityGroupIngress, https response error StatusCode: 400, RequestID: XYZ, api error RulesPerSecurityGroupLimitExceeded: The maximum number of rules per security group has been reached

The issue is from the k8s-<GROUP_NAME>- security group.
On the load balancer I can see that only 1 security group is created with name k8s-<GROUP_NAME>- (and another k8s-traffic-).

Since the limitations are:

  • A security group can have up to 60 rules
  • An ALB can have up to 5 security groups

I would like the tool to notice when the alb.ingress.kubernetes.io/inbound-cidrs annotation lists too many IPs for a single security group and split within the limitations to multiple-security groups

Motivation
This would simplify having to resolve this issue. Currently the alternative is to do this split elsewhere and pass the list of security groups via alb.ingress.kubernetes.io/security-groups

Describe the proposed solution you'd like
Chunk the inbound-cidrs compiled list of IPs in groups of 30 IPs and allow 80 + 443 for each IP, arriving to the maximum allow rule number of 60 per security group

Describe alternatives you've considered
Pass alb.ingress.kubernetes.io/security-groups

Contribution Intention (Optional)

  • Yes, I am willing to contribute a PR to implement this feature
  • No, I cannot work on a PR at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions