How to deploy azure aks on private subnet without internet and allow the public access for the specific IPaddress

Ekambaram 0 Reputation points
2025-04-23T10:08:07.5966667+00:00
We have deployed the AKS in private subnet without internet and below outbound rule in our NSG.
443 - azure cloud  
443 - mcr.microsoft.com (allowed these 2 ips 150.171.70.10,150.171.69.10) for coredns, kubeproxy

I believe these two IP addresses will change in the future. What would be the best approach to add rules for CoreDNS and kube-proxy? Could you please share your insights?

Please share the step by steps details to do it in Azure console.
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,447 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Alex Burlachenko 9,780 Reputation points
    2025-04-28T07:05:30.21+00:00

    Dear Ekambaram,

    Thank you for your question here at Q&A Portal. To deploy AKS in a private subnet without internet access while allowing specific public IPs, you can use Azure Private Clusters with restricted egress traffic. For CoreDNS and kube-proxy dependencies, Microsoft recommends using Azure Firewall with FQDN tags or service tags to dynamically manage required endpoints instead of hardcoding IPs.

    Private AKS Deployment: Follow Microsoft’s guide for private clusters.

    Egress Control: Use Azure Firewall with the AzureKubernetesService FQDN tag (see documentation).

    Specific Public IP Access: Configure your NSG/load balancer to allow ingress only from your desired IPs (details here).

    For CoreDNS/kube-proxy, avoid IP-based rules—leverage service tags (e.g., AzureContainerRegistry) or managed FQDNs to ensure stability.

    Let me know if you need further clarification!

    Best regards,

    Alex

    PS If my answer help to you, please Accept my answer.
    PPS .that is my answer and it is not a comment :)
    
    1 person found this answer helpful.

  2. Ekambaram V 30 Reputation points
    2025-05-05T12:20:08.5433333+00:00

    Hi Alex & Dharani,

    Thank you for your valuable insights. We successfully created an AKS (Azure Kubernetes Service) for our requirements by following the instructions in the link below:

    https://learn.microsoft.com/en-us/azure/aks/network-isolated?pivots=byo-acr

    Thank You

    1 person found this answer 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.