This Helm chart will install the community version of MongoDB databases on a Kubernetes cluster. It is based on the official charts (code).
- Add Helm repositories
helm repo add devpro https://devpro.github.io/helm-charts
helm repo add mongodb https://mongodb.github.io/helm-charts
helm repo update
- Install MongoDB Community Custom Resource Definitions (CRDs)
helm install community-operator-crds mongodb/community-operator-crds --version "0.9.0" --create-namespace --namespace mongodb
- Create a secret with the password for every user
kubectl create secret generic <secret-name> --from-literal=password='somePassword' --namespace mongodb
-
Initiate
values_mine.yaml
from values.yaml and configure the database(s) to be created -
Install MongoDB Community Operator and create databases
helm upgrade --install mongodb-community devpro/mongodb-community -f values_mine.yaml --namespace mongodb
- Review the databases
kubectl get mdbc --namespace mongodb
- Clean-up
helm uninstall mongodb-community -n mongodb
kubectl delete ns mongodb
Look at the Contributing page.