Skip to content

cloudymoma/mongodb-on-gke

Repository files navigation

Description

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.

Supported Features

  • 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

0. Setup environment

gcloud auth login
gcloud config set project <PROJECT_ID>

1. Clone this repo to your local

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)

2. Wait for about 20 minutes until cloud build job completes

Go to GCP console, check the GKE cluster

Verify machine type as you specified

Check the workloads in namespace mongodb

Verify metrics in Managed Service for Prometheus

Velero for backup & restore

See cloud build job history

About

MongoDB on GKE (Google Kubernetes Engine)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published