mongodb
NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications.
About this chart
MongoDB
MongoDB is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster.
TL;DR;
$ helm install <helm-repo>/mongodb
$ helm install stable/mongodb
Introduction
This chart bootstraps a MongoDB deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the BKPR.
Prerequisites
- Kubernetes 1.4+ with Beta APIs enabled
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
$ helm install --name my-release <helm-repo>/mongodb
$ helm install --name my-release stable/mongodb The command deploys MongoDB on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the MongoDB chart and their default values.
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | nil |
global.imagePullSecrets | Global Docker registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
image.registry | MongoDB image registry | docker.io |
image.repository | MongoDB Image name | bitnami/mongodb |
image.tag | MongoDB Image tag | {VERSION} |
image.pullPolicy | Image pull policy | Always |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
image.debug | Specify if debug logs should be enabled | false |
clusterDomain | Default Kubernetes cluster domain | cluster.local |
usePassword | Enable password authentication | true |
existingSecret | Existing secret with MongoDB credentials | nil |
mongodbRootPassword | MongoDB admin password | random alphanumeric string (10) |
mongodbUsername | MongoDB custom user | nil |
mongodbPassword | MongoDB custom user password | random alphanumeric string (10) |
mongodbDatabase | Database to create | nil |
mongodbEnableIPv6 | Switch to enable/disable IPv6 on MongoDB | true |
mongodbDirectoryPerDB | Switch to enable/disable DirectoryPerDB on MongoDB | false |
mongodbSystemLogVerbosity | MongoDB systen log verbosity level | 0 |
mongodbDisableSystemLog | Whether to disable MongoDB system log or not | false |
mongodbExtraFlags | MongoDB additional command line flags | [] |
service.annotations | Kubernetes service annotations | {} |
service.type | Kubernetes Service type | ClusterIP |
service.clusterIP | Static clusterIP or None for headless services | nil |
service.nodePort | Port to bind to for NodePort service type | nil |
service.loadBalancerIP | Static IP Address to use for LoadBalancer service type | nil |
service.externalIPs | External IP list to use with ClusterIP service type | [] |
port | MongoDB service port | 27017 |
replicaSet.enabled | Switch to enable/disable replica set configuration | false |
replicaSet.name | Name of the replica set | rs0 |
replicaSet.useHostnames | Enable DNS hostnames in the replica set config | true |
replicaSet.key | Key used for authentication in the replica set | nil |
replicaSet.replicas.secondary | Number of secondary nodes in the replica set | 1 |
replicaSet.replicas.arbiter | Number of arbiter nodes in the replica set | 1 |
replicaSet.pdb.minAvailable.primary | PDB for the MongoDB Primary nodes | 1 |
replicaSet.pdb.minAvailable.secondary | PDB for the MongoDB Secondary nodes | 1 |
replicaSet.pdb.minAvailable.arbiter | PDB for the MongoDB Arbiter nodes | 1 |
podAnnotations | Annotations to be added to pods | {} |
podLabels | Additional labels for the pod(s). | {} |
resources | Pod resources | {} |
priorityClassName | Pod priority class name | `` |
nodeSelector | Node labels for pod assignment | {} |
affinity | Affinity for pod assignment | {} |
tolerations | Toleration labels for pod assignment | {} |
updateStrategy | Statefulsets update strategy policy | RollingUpdate |
securityContext.enabled | Enable security context | true |
securityContext.fsGroup | Group ID for the container | 1001 |
securityContext.runAsUser | User ID for the container | 1001 |
persistence.enabled | Use a PVC to persist data | true |
persistence.mountPath | Path to mount the volume at | /bitnami/mongodb |
persistence.subPath | Subdirectory of the volume to mount at | "" |
persistence.storageClass | Storage class of backing PVC | nil (uses alpha storage class annotation) |
persistence.accessMode | Use volume as ReadOnly or ReadWrite | ReadWriteOnce |
persistence.size | Size of data volume | 8Gi |
persistence.annotations | Persistent Volume annotations | {} |
persistence.existingClaim | Name of an existing PVC to use (avoids creating one if this is given) | nil |
extraInitContainers | Additional init containers as a string to be passed to the tpl function | {} |
livenessProbe.enabled | Enable/disable the |
Deploy mongodb with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mongodb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmongodb is pinned at v5.17.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply