Search code examples
mongodbazure-container-instancesvnet

Connect with SSH tunnel to MongoDB in Azure Container instance under VNET


I have MongoDB deployed to Azure Container Instance. Now, I want to secure my DB by moving it under Virtual Net. How can I connect to MongoDB using SSH tunnel?


Solution

  • When running ACI in a private VNET/Subnet, the easiest way to access your service would be to create VM in the same VNET/Subnet and log into that VM

    https://learn.microsoft.com/en-us/azure/container-instances/container-instances-vnet#deploy-to-existing-virtual-network