Services and ingresses in AKS reassign private IP's

PR 150 Reputation points
2023-08-08T13:53:04.2233333+00:00

Hello Team,

Our Kubernate service created 2 years ago, few services assigned private IP as external IP but most of services assigned Public IP as External IP's. is this possible to reassign only private IP addresses as External IP's for all the services?

Attached the screenshot for the same.

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,458 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mutaz Nassar 2,361 Reputation points Microsoft Employee
    2023-08-08T13:58:13.74+00:00

    Hi @PR,

    You can add this annotation to the services with public IPs and they will convert to private IP
    service.beta.kubernetes.io/azure-load-balancer-internal":"true"

    or you can patch the service using this commnad:
    kubectl patch service <service name> -n <namespace> -p '{"metadata":{"annotations":{"service.beta.kubernetes.io/azure-load-balancer-internal":"true"}}}'

    Hope this helps, and please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

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.