rancher-partner-charts/charts/mongodb/community-operator
github-actions[bot] 08ee85ddea Charts CI
```
Updated:
  argo/argo-cd:
    - 5.28.1
  asserts/asserts:
    - 1.35.0
  cert-manager/cert-manager:
    - v1.11.1
  crate/crate-operator:
    - 2.26.0
  gitlab/gitlab:
    - 6.10.2
  gluu/gluu:
    - 5.0.15
  hashicorp/vault:
    - 0.24.0
  jenkins/jenkins:
    - 4.3.20
  kasten/k10:
    - 5.5.8
  kong/kong:
    - 2.19.0
  kubecost/cost-analyzer:
    - 1.102.1
  kuma/kuma:
    - 2.1.2
  minio/minio-operator:
    - 5.0.3
  mongodb/community-operator:
    - 0.7.9
  new-relic/nri-bundle:
    - 5.0.8
  pixie/pixie-operator-chart:
    - 0.1.0
  redpanda/redpanda:
    - 3.0.9
  speedscale/speedscale-operator:
    - 1.2.31
  traefik/traefik:
    - 22.1.0
  yugabyte/yugabyte:
    - 2.14.8
  yugabyte/yugaware:
    - 2.14.8
```
2023-04-10 13:14:24 +00:00
..
charts/community-operator-crds Charts CI 2023-04-10 13:14:24 +00:00
templates Removing unpacked chart versions. Changing configuration to just store latest release to reduce quantity of tracked files over time 2022-12-01 23:19:00 -05:00
Chart.lock Charts CI 2023-04-10 13:14:24 +00:00
Chart.yaml Charts CI 2023-04-10 13:14:24 +00:00
README.md Removing unpacked chart versions. Changing configuration to just store latest release to reduce quantity of tracked files over time 2022-12-01 23:19:00 -05:00
values.yaml Charts CI 2023-04-10 13:14:24 +00:00

README.md

MongoDB Community Kubernetes Operator Helm Chart

A Helm Chart for installing and upgrading the MongoDB Community Kubernetes Operator.

Prerequisites

If required, you can install the Custom Resource Definitions Helm Chart separately or as a dependency of this Chart.

If the community-operator-crds Helm chart has been installed already, or if you don't want to install the CRDs (because you have already installed them), then you need to pass --set community-operator-crds.enabled=false, when installing the Operator.

Installing Community Operator

You can install the MongoDB Community Operator easily with:

helm install community-operator mongodb/community-operator

This will install CRDs and Community Operator in the current namespace (default by default). You can pass a different namespace with:

helm install community-operator mongodb/community-operator --namespace mongodb [--create-namespace]

To install the Community Operator in a namespace called mongodb with the optional --create-namespace in case mongodb didn't exist yet.

Deploying a MongoDB Replica Set

The Community Operator will be watching for resources of type mongodbcommunity.mongodbcommunity.mongodb.com; you can quickly install a sample Mongo Database with:

kubectl apply -f https://raw.githubusercontent.com/mongodb/mongodb-kubernetes-operator/master/config/samples/mongodb.com_v1_mongodbcommunity_cr.yaml [--namespace mongodb]
  • Note: Make sure you add the --namespace option when needed.
  • Note 2: A new user will be created with a generic password. Make sure this is only used for testing purposes.

After a few minutes you will have a 3-member MongoDB Replica Set installed in your cluster, that you can check with:

$ kubectl get mdbc
NAME              PHASE     VERSION
example-mongodb   Running   4.2.6

Connecting to MongoDB from a Client Application

The Operator will create a Secret object, per user, created as part of the deployment of the MongoDB resource. Each Secret will contain a Connection String that can be mounted into a client application to connect to this MongoDB instance.

The name of this Secret object follows the convention1:

  • <mongodb-resource-name>-<database>-<username>.

In our example, the above kubectl apply command will create a MongoDB resource with name example-mongodb, with a user my-user on the Database admin. The resulting Secret will be named:

  • example-mongodb-admin-my-user

This Secret object will contain the following attributes:

  • connectionString.standard
  • connectionString.standardSrv
  • username
  • password

A client application will be able to connect using the connectionString attributes or the username and password ones.


  1. Please note that the MongoDB username should comply with DNS-1123 for the Operator to be able to create this Secret. This is a known issue with the Community Operator. ↩︎