Kubernetes: Running MongoDB on Kubernetes with StatefulSets

Views: 24783

Running MongoDB replica set with one click is the goal. Perhaps this will help.

At Google, everything runs in a container, including databases. You just need the right tools. Kubernetes 1.5 includes the new StatefulSet API object (in previous versions, StatefulSet was known as PetSet). With StatefulSets, Kubernetes makes it much easier to run stateful workloads such as databases.

Source: Kubernetes: Running MongoDB on Kubernetes with StatefulSets

I have not yet done this project with Kubernetes, that will be the next stage, especially as the newest version is supposed to come with DNS for Multi Region installations.
I have done this with Docker Swarm via CloudFormation.
Create MongoDB Replica Set in Docker on Ubuntu

The simplest way to create a multi region MongoDB Replica set using Docker Swarm is to use our scripts that are already written. They launch a CloudFormation and the scripts written below.

In order to run the CloudFormation you need to subscribe to the AWS Image in the AWS Marketplace.


Then run the CloudFormation Script:


See our blog for full instructions to install MongoDB Replica Set in Docker Swarm:


You can read about installing a MongoDB Replica Set on Docker Swarm .


You can select various other MongoDB installations on Windows or Linux that we have installed in AWS Marketplace:


Relate Blog articles





Kubernetes: Running MongoDB on Kubernetes with StatefulSets


Leave a Reply