Installing MongoDB on Kubernetes with Replica Sets and NO MongoDB Operator
K8s | ReplicaSet | Simplistic | YAML | No HELM | No Operator | Statefulset | Persistance | AWS | Azure
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.
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.