Changing only the IP allocation method of Load Balancer Service in AKS doesn't work

Alexander Pykavy 1 Reputation point
2022-10-14T12:58:32.94+00:00

We've installed NGINX Ingress Controller (https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx) to the AKS without specifying static IP address for the LoadBalancer service. Now, we realized that it should be static in order to adjust firewall rules accordingly.

We've tried to just specify the current dynamically assigned IP address to the existing service (as suggested in the https://learn.microsoft.com/en-us/azure/aks/internal-lb#specify-an-ip-address article) and upgrade the existing Helm chart in hopes that it will update only IP allocation method at the underlying AKS Load Balancer. But it hasn't been updated and is still set as Dynamic. Also noticed that is updated when we change the IP address to a new one. Unfortunately, we can't do this because this value is already used in out internal DNS servers and we can't easily change it.

So, my question is why type of the IP address is not changed from Dynamic to Static in the underlying AKS Load Balancer when we specify the same IP address explicitly?

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,182 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
458 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 26,596 Reputation points
    2022-10-17T14:58:10.893+00:00

    Hello @Alexander Pykavy ,

    Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question.

    Edit:
    For Azure AKS, no switching from Dynamic to static and vice versa, create the LB either from scratch, if need to switch delete and create a new one as required.
    The steps to use a static IP address are documented here: Use static IP with load balancer - Azure Kubernetes Service | Microsoft Learn

    Once created you will need to specify the allocated IP address in their service definition as per the article.

    --please don't forget to upvote and accept as answer if the reply is 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.