The main purpose for this repo to provide a solution for MongoDB on GKE by leveraging GCP services, like GKE, cloud build, terraform, Managed Prometheus Service and etc.
-
Create GKE cluster, you can specify below parameters for your customized deployment
- Project
- Region
- Machine type
- MongoDB operator pod profile (CPU/Memory/Disk)
small medium large 2C/8GB/512GB SSD 4C/16GB/1TB SSD 8C/32G/2TB SSD -
Install MongoDB community operator
-
Install MongoDB exporter for
Managed Prometheus Service
-
Install Velero, pre-create a backup for MongoDB instance
gcloud auth login
gcloud config set project <PROJECT_ID>
git clone https://github.com/cloudymoma/mongodb-on-gke.git
cd mongodb-on-gke
./setup.sh
Specify a GKE cluster name, cluster domain name for MongoDB, and machine type for GKE node, mongodb operator pod profile. (Notes that you need to specify machine type with >= 4vCPU at least)