1

I would like to provide a whitelisted range for connections to a MongoDB Atlas instance running on Google Cloud. VPC Peering isn't yet available on Atlas for Google Cloud - Is it possible to provide a CIDR range for external IP addresses allocated to nodes in a kubernetes cluster?

Alternatively, any tips on ensuring the source of connections are from an authorized node? (Other than SSL + username and password)

3
  • I realize this is an old question. But to people searching, it may be helpful to use the approach of creating a Google Cloud NAT to do this: cloud.google.com/nat/docs/… cloud.google.com/nat/docs/using-nat#create_nat (using the 'Specify IP addresses for NAT' approach allows creating a fixed IP that may be whitelisted on Atlas) Mar 13, 2019 at 15:58
  • While providing links is useful, it would be more helpful to the asker if you posted a summary of the steps involved on the link you posted as external links can go dead / be removed at any time. For more tips, see How to Answer. Mar 13, 2019 at 17:07
  • Please do not post link-only answers to prevent link rot. Instead, add the most relevant information from the link to your answer or alternatively, post the link as a comment instead of an answer. See this help center article for further information.
    – Sven
    Mar 13, 2019 at 18:00

1 Answer 1

2

There is no direct way to determine which external IPs will be used by VMs (unless you have already reserved IPs) or clusters. Nevertheless there are some workarounds you could consider.

One of them is making outgoing connections from the POD via a proxy. The proxy could be an another Pod or a dedicated VM. Some other approaches are described on this discussion

1
  • Ok, makes sense, in order to not create a single point of failure we'd need to some non-trivial work. Also, increases server spend. Guess I'd have to ask MongoDB Atlas what timelines they have for supporting VPC peering on Google cloud. Thanks for the answer - I'll see what else I can find out and mark yours as the answer if things work out.
    – Stan Bondi
    Dec 7, 2017 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .