mongodb

by joaquinito2051

Helm chartv5.17.0App 4.0.9

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.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
image.registryMongoDB image registrydocker.io
image.repositoryMongoDB Image namebitnami/mongodb
image.tagMongoDB Image tag{VERSION}
image.pullPolicyImage pull policyAlways
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
clusterDomainDefault Kubernetes cluster domaincluster.local
usePasswordEnable password authenticationtrue
existingSecretExisting secret with MongoDB credentialsnil
mongodbRootPasswordMongoDB admin passwordrandom alphanumeric string (10)
mongodbUsernameMongoDB custom usernil
mongodbPasswordMongoDB custom user passwordrandom alphanumeric string (10)
mongodbDatabaseDatabase to createnil
mongodbEnableIPv6Switch to enable/disable IPv6 on MongoDBtrue
mongodbDirectoryPerDBSwitch to enable/disable DirectoryPerDB on MongoDBfalse
mongodbSystemLogVerbosityMongoDB systen log verbosity level0
mongodbDisableSystemLogWhether to disable MongoDB system log or notfalse
mongodbExtraFlagsMongoDB additional command line flags[]
service.annotationsKubernetes service annotations{}
service.typeKubernetes Service typeClusterIP
service.clusterIPStatic clusterIP or None for headless servicesnil
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[]
portMongoDB service port27017
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 setnil
replicaSet.replicas.secondaryNumber of secondary nodes in the replica set1
replicaSet.replicas.arbiterNumber of arbiter nodes in the replica set1
replicaSet.pdb.minAvailable.primaryPDB for the MongoDB Primary nodes1
replicaSet.pdb.minAvailable.secondaryPDB for the MongoDB Secondary nodes1
replicaSet.pdb.minAvailable.arbiterPDB for the MongoDB Arbiter nodes1
podAnnotationsAnnotations to be added to pods{}
podLabelsAdditional labels for the pod(s).{}
resourcesPod resources{}
priorityClassNamePod priority class name``
nodeSelectorNode labels for pod assignment{}
affinityAffinity for pod assignment{}
tolerationsToleration labels for pod assignment{}
updateStrategyStatefulsets update strategy policyRollingUpdate
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container1001
securityContext.runAsUserUser ID for the container1001
persistence.enabledUse a PVC to persist datatrue
persistence.mountPathPath to mount the volume at/bitnami/mongodb
persistence.subPathSubdirectory of the volume to mount at""
persistence.storageClassStorage class of backing PVCnil (uses alpha storage class annotation)
persistence.accessModeUse volume as ReadOnly or ReadWriteReadWriteOnce
persistence.sizeSize of data volume8Gi
persistence.annotationsPersistent Volume annotations{}
persistence.existingClaimName of an existing PVC to use (avoids creating one if this is given)nil
extraInitContainersAdditional init containers as a string to be passed to the tpl function{}
livenessProbe.enabledEnable/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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmongodb is pinned at v5.17.0 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