mongodb-sharded

by joaquinito2051

Helm chartv6.1.10App 6.0.2

MongoDB(R) is an open source NoSQL database that uses JSON for data storage. MongoDB(TM) Sharded improves scalability and reliability for large datasets by distributing data across multiple machines.

About this chart

MongoDB(R) Sharded packaged by Bitnami

MongoDB(R) is an open source NoSQL database that uses JSON for data storage. MongoDB(TM) Sharded improves scalability and reliability for large datasets by distributing data across multiple machines.

Overview of MongoDB® Sharded

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(R) is run and maintained by MongoDB, which is a completely separate project from Bitnami.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

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

Introduction

This chart bootstraps a MongoDB(®) Sharded deployment on a Kubernetes cluster using the Helm package manager.

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.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.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 my-repo/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
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.name""
fullnameOverrideString to fully override common.names.fullname""
namespaceOverrideString to fully override common.names.namespace""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
clusterDomainKubernetes cluster domain namecluster.local
extraDeployArray of extra objects to deploy with the release[]
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)6.0.2-debian-11-r10
image.digestMongoDB(®) Sharded image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyMongoDB(®) Sharded image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSpecify if debug logs should be enabledfalse
auth.enabledEnable authenticationtrue
auth.rootUserMongoDB(®) root userroot
auth.rootPasswordMongoDB(®) root password""
auth.replicaSetKeyKey used for authentication in the replicaset (only when architecture=replicaset)""
auth.existingSecretExisting secret with MongoDB(®) credentials (keys: mongodb-password, mongodb-root-password, mongodb-replica-set-key)""
auth.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.containerPorts.mongodbMongoDB container port27017
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""

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 v6.1.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