title: Unable to connect to MongoDB Atlas from GKE pod
body: <p>I have a pod running on Google Cloud Kubernetes and I have a MongoDB cluster running on Atlas.
  The issue is quite simple:</p>
  
  <p><strong>If I allow IP from ANYWHERE on Atlas MongoDB, I can connect. 
  If I add the IP of the pod (so not from ANYWHERE anymore), it doesn't work.</strong></p>
  
  <p>I also tried locally and from a docker running locally as well, it works.</p>
  
  <p>I got the IP (YY.YYY.YYY.YY) of my pod using:</p>
  
  <pre><code>MacBook-Pro-de-Emixam23:plop-service emixam23$ kubectl get services
  NAME           TYPE           CLUSTER-IP    EXTERNAL-IP     PORT(S)                           AGE
  polop-service  LoadBalancer   XX.XX.X.XXX   YY.YYY.YYY.YY   ZZZZZ:32633/TCP,ZZZZZ:32712/TCP   172m
  kubernetes     ClusterIP      XX.X.X.X      &lt;none&gt;          443/TCP                           3h24m
  </code></pre>
  
  <p>But by the behavior I get.. I feel like this EXTERNAL-IP isn't the IP from where my requests are sent from.</p>
  
  <p>Can anyone explain to me what can be the issue?</p>