AKS deployed application to access on-prem server

Santhi Dhanuskodi 165 Reputation points
2024-05-16T12:53:21.2833333+00:00

Hi,

I want to connect to on-prem sql server from a .net application which is deployed in AKS.

We already have Azure relay/hybrid connection setup for the same, but that requires azure app service. I am looking for options to connect from AKS deployed app, atleast forward sql operations to azure relay/hybrid Connection manager

Please provide solutions/suggestions.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,254 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,948 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,903 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 58,356 Reputation points
    2024-05-16T17:09:53.0433333+00:00

    Azure relay/hybrid not supported by containers as it requires support code (a tcp reverse proxy client) in the app service hosting. that is, its an app service feature only. there are samples of calling the hybrid connection directly, so in theory you could write the sqlserver reverse proxy client yourself and host in the container.

    https://github.com/Azure/azure-relay/tree/master/samples/hybrid-connections/dotnet

    you will probably need a more traditional vpn solution:

    https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpngateways