Deploy Pulse databases with Helm

Use the helm-databases umbrella chart to deploy Pulse database dependencies on Kubernetes by using supported operators and charts.

Supported databases

DatabaseOperator or chartVersion
MongoDBMongoDB Controllers for Kubernetes (MCK)1.7.0
PostgreSQLCloudNativePG0.27.1
ElasticsearchECK Operator3.3.0
VictoriaMetricsVictoriaMetrics Operator0.58.1
RedisOpsTree Redis Operator0.23.0
NATSNATS Helm Chart1.3.16

Before You Begin

Make sure you have:

  • Kubernetes 1.21 or later
  • Helm 3.x
  • kubectl configured for your cluster
  • Cluster admin permissions to install CRDs and ClusterRoles

Add Helm repositories

Before installing, you must register the Helm repositories that this chart references. Run all six commands, or only the ones for the databases you plan to install:

Bash
Copy

Then pull the dependency charts:

Bash
Copy

Installation Modes

This chart supports two install modes using the same chart.

Fresh Install: Two-Step Process

On a fresh cluster where operator CRDs do not exist yet, Helm cannot create custom resources (database instances) in the same transaction that installs the CRDs. The chart handles this automatically.

Step 1 -- Install operators + CRDs (database instances are auto-deferred)

Bash
Copy

Step 2 -- Create database instances (CRDs now exist in the API)

Bash
Copy

The post-install notes will tell you when step 2 is needed. On subsequent upgrades, everything works in a single command.

Mode 1: All databases in a single namespace

Deploy every enabled database into one shared namespace. Follow the two-step process above on a fresh cluster.

Bash
Copy

Disable specific databases at install time:

Bash
Copy

Mode 2: Each database in its own namespace

Use the convenience value files in values/ to install one database per release. The same two-step process applies per release.

MongoDB

Bash
Copy

PostgreSQL

Bash
Copy

Elasticsearch

Bash
Copy

VictoriaMetrics

Bash
Copy

Redis

Bash
Copy

NATS

Bash
Copy

MongoDB Sharded Cluster

The chart supports deploying a sharded MongoDB cluster by using the Community Operator. No Ops Manager is required. Set mongodb.cr.type=shardedCluster to enable it.

The MongoDBCommunity operator does not officially support sharding. It works by deploying separate MongoDBCommunity CRs for config servers, shard servers, and mongos routers, wired together through a shared keyfile and a mongos command override. Test thoroughly before production use.

What Gets Created

When type: shardedCluster is set, the chart creates:

ResourceNameDescription
Secret{name}-shared-keyfileMaster keyfile (auto-generated or user-provided)
Secret (×N){name}-configsvr-keyfile, {name}-shard-N-keyfile, {name}-mongos-keyfilePer-component copies of the keyfile
Secretadmin password secretShared admin credentials
MongoDBCommunity{name}-configsvrConfig server replica set (clusterRole: configsvr)
MongoDBCommunity (×shardCount){name}-shard-0, {name}-shard-1, ...Shard replica sets (clusterRole: shardsvr)
MongoDBCommunity{name}-mongosmongos query routers (command override)
Job (Helm hook){name}-add-shardsPost-install job that runs sh.addShard() for each shard

Deploy

Step 1 -- Install the operator (same two-step process as a fresh install)

Bash
Copy

Step 2 -- Create the sharded cluster CRs

Bash
Copy

Deploy with Custom Settings

Override shard count, router count, or provide your own keyfile:

Bash
Copy

To supply your own keyfile (must be at least 6 characters):

Bash
Copy

If keyfile.value is left empty, which is the default, a random keyfile is auto-generated on first install and preserved across upgrades.

Verify the Cluster

After the install and upgrade cycle, check the status of all components:

Bash
Copy

Architecture Overview

Bash
Copy

All components share a common keyfile for internal authentication.

Using a Self-Hosted / Mirror Chart Repository

The Chart.yaml references repositories by using Helm aliases, such as @mongodb. To point at your own mirror, re-add the alias before running helm dependency update.

Bash
Copy

Each repository alias can be overridden independently, which gives you per-database control over the chart source.

Configuration

Global Values

ParameterDescriptionDefault
global.imagePullSecretsImage pull secrets for operator pods[]
global.openshiftEnable OpenShift-compatible security contextsfalse

Per-Database Values

Each database section in values.yaml has the same structure:

Bash
Copy

MongoDB

ParameterDescriptionDefault
mongodb.enabledDeploy MCK operator + instancetrue
mongodb.cr.createCreate MongoDB CR(s)true
mongodb.cr.nameInstance name (base name for sharded components)pulse-mongodb
mongodb.cr.typereplicaSet or shardedClusterreplicaSet
mongodb.cr.versionMongoDB version7.0.14
mongodb.cr.replicaSet.membersReplica set members (replicaSet mode)3
mongodb.cr.shardedCluster.shardCountNumber of shard replica sets2
mongodb.cr.shardedCluster.membersPerShardMembers per shard replica set3
mongodb.cr.shardedCluster.mongosCountmongos router instances2
mongodb.cr.shardedCluster.configServerCountConfig server replica set members3
mongodb.cr.shardedCluster.keyfile.valueCustom keyfile string (auto-generated if empty)""
mongodb.cr.storage.sizeData volume size10Gi
mongodb.cr.auth.adminUserDefault admin usernamepulse-admin
mongodb.cr.auth.adminPasswordDefault admin password (CHANGE THIS)changeme

PostgreSQL (CloudNativePG)

ParameterDescriptionDefault
postgresql.enabledDeploy CNPG operator + clustertrue
postgresql.cr.createCreate Cluster CRtrue
postgresql.cr.nameCluster namepulse-postgresql
postgresql.cr.instancesNumber of instances3
postgresql.cr.versionPostgreSQL major version16
postgresql.cr.storage.sizeData volume size10Gi
postgresql.cr.bootstrap.databaseInitial database namepulse
postgresql.cr.bootstrap.ownerDatabase ownerpulse

Elasticsearch (ECK)

ParameterDescriptionDefault
elasticsearch.enabledDeploy ECK operator + clustertrue
elasticsearch.cr.createCreate Elasticsearch CRtrue
elasticsearch.cr.nameCluster namepulse-elasticsearch
elasticsearch.cr.versionElasticsearch version8.17.0
elasticsearch.cr.nodeSetsNode set definitions (count, storage, resources)1 set, 3 nodes, 20Gi

VictoriaMetrics

ParameterDescriptionDefault
victoriametrics.enabledDeploy VM operator + instancetrue
victoriametrics.cr.createCreate VMSingle CRtrue
victoriametrics.cr.nameInstance namepulse-victoriametrics
victoriametrics.cr.retentionPeriodData retention period30d
victoriametrics.cr.storage.sizeData volume size10Gi

Redis (OpsTree)

ParameterDescriptionDefault
redis.enabledDeploy Redis operator + instancetrue
redis.cr.createCreate Redis CRtrue
redis.cr.nameInstance namepulse-redis
redis.cr.modeDeployment mode: standalone, cluster, replication, sentinelstandalone
redis.cr.clusterSizeNodes (for cluster, replication, sentinel modes)3
redis.cr.versionRedis image tagv7.2.6
redis.cr.storage.sizeData volume size5Gi
redis.cr.exporter.enabledEnable Prometheus exporter sidecartrue

NATS

nats.enabledDeploy NATStrue
nats.global.image.pullSecretNamesList of image pull secret names for private registries[]
nats.container.image.repositoryCustom NATS server image repositorynats
nats.container.image.tagCustom NATS server image tag2.11.10-alpine
nats.container.image.registryCustom image registry (overrides Docker Hub)""
nats.container.image.fullImageNameFull image name (overrides registry + repo + tag)""
nats.natsBox.enabledDeploy nats-box diagnostic toolboxfalse
nats.config.cluster.enabledEnable NATS clusteringtrue
nats.config.cluster.replicasCluster replicas3
nats.config.jetstream.enabledEnable JetStream persistencetrue
nats.config.jetstream.fileStore.pvc.sizeJetStream PVC size5Gi

For full NATS chart values, see the official NATS chart docs.

Operator-Only Install

To deploy only the operators without creating database instances, which is useful for shared operator installations, set cr.create: false:

Bash
Copy

You can then create database instances separately by applying CRs with kubectl.

Skipping CRD Installation

If CRDs already exist in the cluster, from a prior install or another release, you may get ownership conflicts. Use these options to skip CRD installation:

Bash
Copy
DatabaseHow to skip CRDs
MongoDB--skip-crds flag (MCK uses Helm-native crds/ directory)
PostgreSQLpostgresql.crds.create=false
Elasticsearchelasticsearch.installCRDs=false
VictoriaMetricsvictoriametrics.crds.enabled=false
Redis--skip-crds flag (CRDs are in Helm-native crds/ directory)
NATSNo CRDs

Alternatively, adopt existing CRDs into your release:

Bash
Copy

OpenShift Support

Set global.openshift=true to enable OpenShift-compatible settings:

Bash
Copy

This will:

  • Remove fixed runAsUser / runAsGroup settings from all CR pod templates (MongoDB, Elasticsearch, Redis, VictoriaMetrics, PostgreSQL)
  • Let OpenShift Security Context Constraints (SCCs) assign UIDs
  • Avoid privileged: true in all workloads

Built-in OpenShift support per operator

OperatorOpenShift handling
ECKAuto-detects OpenShift via config.setDefaultSecurityContext: "auto-detect"
VictoriaMetricsAuto-adapts via global.compatibility.openshift.adaptSecurityContext: "auto"
OpsTree RedisBuilt-in OpenShift support (openshift chart keyword)
CloudNativePGSet postgresql.containerSecurityContext.runAsUser=null to clear hardcoded UID
MongoDBCR template clears securityContext when global.openshift=true
NATSStandard securityContext, runs as non-root by default

Upgrading

Bash
Copy

Uninstalling

Bash
Copy

CRDs are not automatically removed by Helm.

To remove CRDs manually, which deletes all custom resources, run:

Bash
Copy

Commands to Install Databases on OpenShift

MongoDB

Bash
Copy

VictoriaMetrics

Bash
Copy
Bash
Copy

Elastic

Bash
Copy
Bash
Copy
Bash
Copy
Bash
Copy

Postgres

Bash
Copy

NATS

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard