Hello Kenneth Webb Vargas
I understand that you are experiencing an issue connecting the PostgreSQL DB (paas) it is connected via private endpoint from the container apps.
Both the container apps and the SQL DB are in the same VNET but different subnets. Connectivity and resolution work fine from the test VM, but in the container console, the DNS server IP is taking the loopback IP (127.0.0.11) during resolution. However, a forced nslookup resolves successfully.
Results:
/app # nslookup tes**..89os$g&&es.database.azure.com
Server: 127.0.0.11
Address: 127.0.0.11:53
Non-authoritative answer: tes.89os$g&&es.database.azure.com canonical name = tes..89os$g&&es.privatelink.postgres.database.azure.com
Name: tes.**.89os$g&&es.privatelink.postgres.database.azure.com
Address: 10.0.1.4
Non-authoritative answer: tes**.89os$g&&es.postgres.database.azure.com canonical name = tes.**.89os$g&&es..privatelink.postgres.database.azure.com
/app # nslookup tes**.***.89os$g&&es..postgres.database.azure.com 168.63.129.16 Server: 168.63.129.16 Address: 168.63.129.16:53
Non-authoritative answer: tes**..89os$g&&es..postgres.database.azure.com canonical name = tes..89os$g&&es.privatelink.postgres.database.azure.com Name: tes.***.89os$g&&es.privatelink.postgres.database.azure.com Address: 10.0.1.4
Non-authoritative answer: tes**.***.89os$g&&es.postgres.database.azure.com canonical name = testmeka-db-dev.privatelink.postgres.database.azure.com
From VM to Postgres sql DB nslookup and psping results
Nslookup:
C:\Users\kwebb>nslookup testmeka-db-dev.postgres.database.azure.com Server: UnKnown Address: 168.63.129.16
Non-authoritative answer: Name: tes**.***.89os$g&&es.v.privatelink.postgres.database.azure.com Address: 10.0.1.4 Aliases: testmeka-db-dev.postgres.database.azure.com
As we determined the issue is within Container App, you have created a new question for this issue here https://learn.microsoft.com/en-us/answers/questions/2275965/communication-from-container-apps-subnet-to-postgr and it is being worked upon by the container app team. After the resolution is achieved, we will add an answer here for community benefit.
Hope the above answer helps! Please let us know do you have any further queries.
Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.