Issues connecting to MongoAtlas when using multiple nodes

I am using istio in an AKS cluster, I have an app that connects to mongo atlas (mongodb+srv)
I have the following ServiceEntry:

apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: mongo-atlas
spec:
  hosts:
    - mdb-asdf.mongodb.net
  ports:
    - number: 27017
      name: mongo
      protocol: MONGO
  resolution: NONE
  location: MESH_INTERNAL

I was using only 1 node (VM), but recently I added another node and all pods created on that node can’t connect to mongo atlas, the relevant message in the logs says DnsClient.DnsResponseException: Header id mismatch.
Also, both nodes are behind the same load balancer (same public IP)

1 Like