Connection issues with multiple private endpoints for a single resource

Najam ul Saqib 340 Reputation points
2024-10-14T11:35:42.9966667+00:00

The architecture explanation is complex so read carefully

I have a SQL server in East US region that I want other services to connect to privately, other services includes:

  1. AKS
  2. App services (both web and function apps)

AKS is in West US 2 so I created a private endpoint of SQL server in West US 2 in the VNet of AKS for smooth communication between AKS and SQL Server, I can verify this communication by going to "Metrics" tab in the said private endpoint and it shows some spikes which means some communication is going through it.

Now, I have app services in West US region, web apps are integrated to a VNet A and function apps are integrated to a VNet B; now to connect both of them to SQL privately, I needed to create two private endpoints in SQL and that's what I did.

Now, the issue I face is that these app services are unable to connect to the SQL server privately, and I cannot see any spikes on the Metrics graph.

I deployed a VM connected to VNet A, when I tried to nslookup the SQL's DNS name, it resolved to the public IP, after much troubleshooting I opened the Virtual Network Links in the Provaye DNS Zone of the database and it didn't contain the VNet A and VNet B but just AKS's VNet; I manually added VNet B and retired nslookup this time it resolved to a private IP address but the range was 172.x.x.x which is in VNet B, the private range in VNet A is 10.x.x.x, this is confusing now.

Can someone explain me, what am I doing wrong? Ask me if you need more information.

Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
518 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 47,206 Reputation points Microsoft Employee
    2024-10-14T12:06:53.17+00:00

    @Najam ul Saqib ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    From your verbatim, I believe you are running into the below issue,

    Existing Private DNS Zones linked to a single Azure service should not be associated with two different Azure service Private Endpoints. This will cause a deletion of the initial A-record and result in resolution issue when attempting to access that service from each respective Private Endpoint. Create a DNS zone for each Private Endpoint of like services. Don't place records for multiple services in the same DNS zone.

    See : Caution | Azure Private Endpoint private DNS zone

    • This is because a Private DNS Zone can not have multiple records with the same name.
    • In your case, with the Private EndPoint of AKS VNET, let's say you have
      • <YOURSQLServer>.database.windows.net -----> IP of PE in AKS VNET
    • Now, this means you cannot have
      • <YOURSQLServer>.database.windows.net -----> IP of PE in VNETA
        or
      • <YOURSQLServer>.database.windows.net -----> IP of PE in VNETB

    I would suggest you create 3 separate Private DNS Zones to hold the record for each Private EndPoint, each having the PE IPs respectively

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    1 person found this answer helpful.

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.