mongodb-sharded

by [riftbit]

Helm chartv3.9.7App 4.4.9Verified publisher

NoSQL document-oriented database that stores JSON-like documents with dynamic schemas, simplifying the integration of data in content-driven applications. Sharded topology.

About this chart

MongoDB® Sharded packaged by Bitnami

MongoDB® Sharded 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.

This chart uses the sharding method for distributing data across multiple machines. This is meant for deployments with very large data sets and high throughput operations.

Disclaimer: The respective trademarks mentioned in the offering are owned by the respective companies. We do not provide a commercial license for any of these products. This listing has an open-source license. MongoDB® is run and maintained by MongoDB, which is a completely separate project from Bitnami.

TL;DR

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/mongodb-sharded

Introduction

This chart bootstraps a MongoDB® Sharded 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 3.1.0
  • 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-sharded

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

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal storage class for dynamic provisioning""

Common parameters

NameDescriptionValue
nameOverrideString to partially override mongodb.fullname template (will maintain the release name)""
fullnameOverrideString to fully override mongodb.fullname template""
clusterDomainKubernetes Cluster Domaincluster.local
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

MongoDB® Sharded parameters

NameDescriptionValue
image.registryMongoDB® Sharded image registrydocker.io
image.repositoryMongoDB® Sharded Image namebitnami/mongodb-sharded
image.tagMongoDB® Sharded image tag (immutable tags are recommended)4.4.9-debian-10-r0
image.pullPolicyMongoDB® Sharded image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSpecify if debug logs should be enabledfalse
mongodbRootPasswordMongoDB® root password""
replicaSetKeyReplica Set key (shared for shards and config servers)""
existingSecretExisting secret with MongoDB® credentials""
usePasswordFileMount credentials as files instead of using environment variablesfalse
shardsNumber of shards to be created2
common.mongodbEnableNumactlEnable launch MongoDB instance prefixed with "numactl --interleave=all"false
common.useHostnamesEnable DNS hostnames in the replica set configtrue
common.mongodbEnableIPv6Switch to enable/disable IPv6 on MongoDB®false
common.mongodbDirectoryPerDBSwitch to enable/disable DirectoryPerDB on MongoDB®false
common.mongodbSystemLogVerbosityMongoDB® system log verbosity level0
common.mongodbDisableSystemLogWhether to disable MongoDB® system log or notfalse
common.mongodbMaxWaitTimeoutMaximum time (in seconds) for MongoDB® nodes to wait for another MongoDB® node to be ready120
common.initScriptsCMConfigmap with init scripts to execute""
common.initScriptsSecretSecret with init scripts to execute (for sensitive data)""
common.extraEnvVarsAn array to add extra env vars[]
common.extraEnvVarsCMName of a ConfigMap containing extra env vars""
common.extraEnvVarsSecretName of a Secret containing extra env vars""
common.sidecarsAdd sidecars to the pod[]
common.initContainersAdd init containers to the pod[]
common.podAnnotationsAdditional pod annotations{}
common.podLabelsAdditional pod labels{}
common.extraVolumesArray to add extra volumes[]
common.extraVolumeMountsArray to add extra mounts (normally used with extraVolumes)[]
common.serviceAccount.createWhether to create a Service Account for all pods automaticallyfalse
common.serviceAccount.nameName of a Service Account to be used by all Pods""
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/bitnami-shell
volumePermissions.image.tagInit container volume-permissions image tag10-debian-10-r197
volumePermissions.image.pullPolicyInit container volume-permissions image pull policyAlways
volumePermissions.image.pullSecretsInit container volume-permissions image pull secrets[]
volumePermissions.resourcesInit container resource requests/limit{}
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
securityContext.runAsUserUser ID for the container1001
securityContext.runAsNonRootRun containers as non-root userstrue
service.nameSpecify an explicit service name

Deploy mongodb-sharded with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mongodb-sharded 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-sharded is pinned at v3.9.7 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