title: Network setup for accessing Azure Redis service from Azure AKS
body: <p>We have an application that runs on an Ubuntu VM. This application connects to Azure Redis, Azure Postgres and Azure CosmosDB(mongoDB) services.</p>
  
  <p>I am currently working on moving this application to Azure AKS and intend to access all the above services from the cluster. The services will continue to be external and will not reside inside the cluster.</p>
  
  <p>I am trying to understand how the network/firewall of both the services and aks should be configured so that pods inside the cluster can access the above services or any Azure service in general.</p>
  
  <p>I tried the following:</p>
  
  <ul>
  <li>Created a configMap containing the connection params(public ip/address, username/pwd, port, etc) of all the services and used this configMap in the deployment resource. </li>
  <li>Hardcoded the connection params of all the services as env vars inside the container image</li>
  <li>In the firewall/inbound rules of the services, I added the AKS API ip, individual node ips</li>
  </ul>
  
  <p>None of the above worked. Did I miss anything? What else should be configured?</p>
  
  <p>I tested the setup locally on minikube with all the services running on my local machine and it worked fine.</p>