<p>I have a .NET 5.0 App that connects to a SQL Server database. If I host the App in Azure App service and the database in Azure SQL database, all is fine.</p>
<p>Now I put the App in a Docker container and deploy it in AKS. It doesn't work anymore (can't connect to the Azure SQL database).</p>
<p>How should I configure my AKS deployment to have it working?</p>

<p>Did you check about the ingress and firewall rules ?</p>
<p><a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/azure-sql/database/firewall-configure</a></p>
<p>Open the firewall or edit ingress rules so that AKS PODs can connect to the database or else you have to the VPC peering.</p>
<p><a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/private-endpoint-overview" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/azure-sql/database/private-endpoint-overview</a></p>
