Can we forcefully keep one specific ip address for Internal load balancer?

Tanul 1,281 Reputation points
2023-05-26T07:33:03.52+00:00

Hello,

As mentioned here, we can specify the ip address for internal load balancer but, is it possible to specifically keep that ip only for load balancer so that other resource cannot occupy it.

For eg. if for some reason we delete this internal load balancer service and within that moment a new pod or a new node in AKS(with Azure CNI networking) is created then its highly likely that they will occupy the ip address.

How to keep that internal subnet ip specifically for internal load balancer?

Kind Regards,

Tanul

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,103 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
439 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andrei Barbu 2,581 Reputation points Microsoft Employee
    2023-05-26T07:59:04.5833333+00:00

    Hello Tanul

    The IP address assignment in a subnet is incremental, for example, if you have Azure CNI and one node using 10.224.0.4 - 10.224.0.32, you can't reserve 10.224.0.33. If you create a new node, the IPs for that node will start with 10.224.0.33. It is not possible to keep specific IPs unassigned. The only workaround I think of is to have a resource that would use that IP, remove it, and then create the internal load balancer with "service.beta.kubernetes.io/azure-load-balancer-ipv4: <IP>" annotation.

    You may consider opening a feature request here: https://github.com/Azure/AKS/issues

    If you have additional questions, please let us know in the comments.

    If this has been helpful, please take a moment to accept answers as this helps increase visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A!

    User's image


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.