Should Node.js and MongoDB be in different pods?

Viewed 333

I am trying to host a simple Node.js app connected to MongoDB, I look on the web, I've found 2 different methods and some guides to do so:

  1. Different pods:

    • Example from the official Kubernetes documentation.
    • Example from the official Google Cloud Platform documentation.
  2. Same pod:

    • Example from the official IBM documentation.

This confused me a bit, which is the best practise to achieve that?

1 Answers
Related