<p>I am learning <em>Kubernetes</em> and finding some suggestions about deploying my application.</p>

<p>My application background:</p>

<blockquote>
  <p>Backend: NodeJS   </p>
  
  <p>Frontend: ReactJS</p>
  
  <p>Database: MongoDB (Just run <strong>mongod</strong> to start instead of using MongoDB cloud services)</p>
</blockquote>

<p>I already know how to use <strong><em>Docker compose</em></strong> to deploy the application in single node.</p>

<p>And now I want to deploy the application with Kubernetes (3 nodes).</p>

<p>So how to deploy MongoDB and make sure the MongoDB data is <strong>synchronize</strong> in 3 nodes?</p>

<p>I have researched some information about this and I am confused on some keywords. </p>

<p><strong>E.g. Deploy a Standalone MongoDB Instance,
StatefulSet, ...</strong> </p>

<p>Are this information / articles suitable for my situation? or do you know any information about this? Thanks!</p>

potato
<p>You can install mongodb using <a href="https://github.com/helm/charts/tree/master/stable/mongodb" rel="nofollow noreferrer">this</a> helm chart.</p>
<blockquote>
<p>You can start the MongoDB chart in replica set mode with the following parameter: replicaSet.enabled=true</p>
<p>Some characteristics of this chart are:</p>
<p>Each of the participants in the replication has a fixed stateful set so you always know where to find the primary, secondary or arbiter nodes.
The number of secondary and arbiter nodes can be scaled out independently.
Easy to move an application from using a standalone MongoDB server to use a replica set.</p>
</blockquote>
<p>See <a href="https://github.com/helm/charts/tree/master/stable/mongodb#configuration-and-installation-details" rel="nofollow noreferrer">here</a> to learn configuration and installation details</p>
