<p>I have .NET Core 1.1 Test project and I am building this project inside kubernetes pods using VSTS linux agent. In one of tests, I am trying to connect to SQL Server (installed inside one VM in Google Compute Engine). Whenever this test executes (with dotnet test command), I am getting below exception</p>

<p>**System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 40 - Could not open a connection to SQL Server)****</p>

<p>I have tried below options in Google Compute Engine's VM
1. Pinged it with public IP address - working
2. SQL services are running - verified with SQL Server configuration manager
3. TCP/IP and Named Pipes protocols and port are enabled in configuration manager
4. Remote connections to the server is allowed (thru SQL Server Management Studio)</p>

<p>But still getting the same exception</p>

<p>This problem is resolved now...the issue was my kubernetes build cluster was in some other network and my google compute engine's VM was in default network..Once I changed network of VM..it started working</p>
