It seems like you're encountering a DNS resolution issue specifically related to Azure Database for PostgreSQL servers configured with private access (virtual network integration) from within your AKS clusters. Here are a few points to consider based on the context provided:
- Private DNS Zone: Ensure that the Private DNS zone for your Azure Database for PostgreSQL is correctly linked to the virtual network where your AKS clusters are deployed. If the Private DNS zone is not linked, clients in the AKS clusters will not be able to resolve the database server's FQDN.
- DNS Forwarder: If you're using a custom DNS server, make sure you have a DNS forwarder configured to resolve the FQDN of your Azure Database for PostgreSQL instance. The forwarder IP address should be
168.63.129.16. - Network Configuration: Confirm that there are no network security group (NSG) rules or other firewall settings that might be blocking traffic from your AKS clusters to the PostgreSQL servers.
- Virtual Network Integration Limitations: Be aware of the limitations of virtual network integration. For example, once an Azure Database for PostgreSQL instance is deployed to a virtual network and subnet, it cannot be moved to another virtual network or subnet. This could affect your ability to change configurations if needed.
- Testing Connectivity: Since you mentioned that connectivity works fine with Private Endpoint, it may be worth testing the connectivity from a VM in the same virtual network as the PostgreSQL server to isolate whether the issue is specific to AKS or a broader network configuration issue.
If the above checks do not resolve the issue, consider reaching out to Azure support for more in-depth troubleshooting, as they may have insights into specific configurations or known issues affecting your setup.
References: