MongoServerSelectionError: Server selection timed out after 30000 ms

The actual solution to this problem is that we need to expose the Network Load Balancer as an “internet-facing” network load balancer. By default it is exposed as a internal facing NLB.

To achieve this we need to add the following annotation

      serviceAnnotations:
        service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing

https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.5/guide/service/nlb/

We can test its now internet facing by attemtping to curl <address>:27017