Photo by Luke Jernejcic on Unsplash

Installing MongoDB on Kubernetes with Replica Sets and NO MongoDB Operator

K8s | ReplicaSet | Simplistic | YAML | No HELM | No Operator | Statefulset | Persistance | AWS | Azure

βš— Kevin Summersill πŸ”‹
Published in
5 min readSep 9, 2021

--

Are you tired of searching for MongoDB on Kubernetes and Immediately going to a MongoDB site on how to use their operator? Are you tired of finding nothing but Helm packages that you have no clue what is really going or finding a set of instructions that are made very complex? Are you tired of having no choice but to be pushed to a MongoDB cloud or Cloud Service Provider (AWZ, Azure, and GCP) service? I was tired of looking online just to find some complex way of setting up MongoDB. So let's cut out the complexity and move on to making MongoDB simple.

Shows the full stack deployed on ArgoCD within cluster

Step 1. Setting up the Role-Based Access Controls (RBAC)

The first thing we need to do is set up a Service Account, a ClusterRole, and connect the two with a Cluster RoleBinding. This will be used for our β€œheadless” service that MongoDB will utilize when creating DNS association of the replica sets.

--

--

βš— Kevin Summersill πŸ”‹
Geek Culture

Enterprise Solution Architect | Certified K8s Administrator/Developer βš“ | SAFe SPC | Cert Terraform | AWS Solutions Architect | Dev*Ops/GitOps Engineer πŸ”₯