This repo publishes the docker image and helm chart for MongoDB.
- Kubernetes 1.10+
- Helm 3.0+
This chart will do the following:
- Create a standalone MongoDB instance using a StatefulSet.
- Create a MongoDB replicaset having a primary, multiple secondary and multiple arbiter nodes using a StatefulSet.
- Create a PodDisruptionBudget.
- Create a Headless Service to control the domain of the MongoDB instances.
- Create a Service configured to connect to the available MongoDB instance on the configured client port.
- Optionally apply a Pod Anti-Affinity to spread the MongoDB cluster across nodes.
- Optionally start an Exporter container for Prometheus.
- Optionally create a Prometheus ServiceMonitor for exporter container.
- Optionally add a CronJob to take daily backup of MongoDB and save it in Google Cloud Storage.
- Optionally add prometheus alerts.
You can install the chart with the release name mongodb
as below.
$ helm upgrade mongodb ./helm --install --namespace hypertrace
You can specify each parameter using the --set key=value[,key=value]
argument to helm install
.
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
$ helm upgrade my-release ./helm --install --namespace hypertrace -f values.yaml
- You can find all user-configurable settings, their defaults in values.yaml.