mongodb

by microfunctionsio

Helm chartv7.8.10App 4.2.4Verified publisher

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 repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/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.12+
  • Helm 2.11+ or Helm 3.0-beta3+
  • PV provisioner support in the underlying infrastructure
  • ReadWriteMany volumes for deployment scaling

Installing the Chart

To install the chart with the release name my-release:

$ helm install my-release bitnami/mongodb

The command deploys MongoDB on the Kubernetes cluster in the default configuration. The Parameters 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.

Parameters

The following table lists the configurable parameters of the MongoDB chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
image.registryMongoDB image registrydocker.io
image.repositoryMongoDB Image namebitnami/mongodb
image.tagMongoDB Image tag{TAG_NAME}
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.debugSpecify if debug logs should be enabledfalse
nameOverrideString to partially override mongodb.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override mongodb.fullname template with a stringnil
volumePermissions.enabledEnable init container that changes volume permissions in the data directory (for cases where the default k8s runAsUser and fsUser values do not work)false
volumePermissions.image.registryInit container volume-permissions image registrydocker.io
volumePermissions.image.repositoryInit container volume-permissions image namebitnami/minideb
volumePermissions.image.tagInit container volume-permissions image tagbuster
volumePermissions.image.pullPolicyInit container volume-permissions image pull policyAlways
volumePermissions.resourcesInit container resource requests/limitnil
clusterDomainDefault Kubernetes cluster domaincluster.local
usePasswordEnable password authenticationtrue
existingSecretExisting secret with MongoDB credentialsnil
mongodbRootPasswordMongoDB admin passwordrandom alphanumeric string (10)
mongodbUsernameMongoDB custom user (mandatory if mongodbDatabase is set)nil
mongodbPasswordMongoDB custom user passwordrandom alphanumeric string (10)
mongodbDatabaseDatabase to createnil
mongodbEnableIPv6Switch to enable/disable IPv6 on MongoDBfalse
mongodbDirectoryPerDBSwitch to enable/disable DirectoryPerDB on MongoDBfalse
mongodbSystemLogVerbosityMongoDB system log verbosity level0
mongodbDisableSystemLogWhether to disable MongoDB system log or notfalse
mongodbExtraFlagsMongoDB additional command line flags[]
service.nameKubernetes service namenil
service.annotationsKubernetes service annotations, evaluated as a template{}
service.typeKubernetes Service typeClusterIP
service.clusterIPStatic clusterIP or None for headless servicesnil
service.portMongoDB service port27017
service.nodePortPort to bind to for NodePort service typenil
service.loadBalancerIPStatic IP Address to use for LoadBalancer service typenil
service.externalIPsExternal IP list to use with ClusterIP service type[]
service.loadBalancerSourceRangesList of IP ranges allowed access to load balancer (if supported)[] (does not add IP range restrictions to the service)
replicaSet.enabledSwitch to enable/disable replica set configurationfalse
replicaSet.nameName of the replica setrs0
replicaSet.useHostnamesEnable DNS hostnames in the replica set configtrue
replicaSet.keyKey used for authentication in the replica setrandom alphanumeric string (10)
replicaSet.replicas.secondaryNumber of secondary nodes in the replica set1
`replicaSet.replicas.arbite

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmongodb is pinned at v7.8.10 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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