Skip to content

Install Percona Server for MongoDB with customized parameters

You can customize the configuration of Percona Server for MongoDB and install it with customized parameters.

To check available configuration options, see deploy/cr.yaml and Custom Resource Options.

To customize the configuration, do the following:

  1. Clone the repository with all manifests and source code by executing the following command:

    $ git clone -b v1.16.1
  2. Edit the required options and apply the modified deploy/cr.yaml file as follows:

    $ kubectl apply -f deploy/cr.yaml

To install Percona Server for MongoDB with custom parameters, use the following command:

$ helm install --set key=value

You can pass any of the Operator’s Custom Resource options as a --set key=value[,key=value] argument.

The following example deploys a Percona Server for MongoDB Cluster in the psmdb namespace, with disabled backups and 20 Gi storage:

$ helm install my-db percona/psmdb-db --version 1.16.1 --namespace psmdb \
  --set "" --set "replsets.rs0.size=3" \
  --set "" \
  --set backup.enabled=false --set sharding.enabled=false

You can specify customized options in a YAML file instead of using separate command line parameters. The resulting file similar to the following example looks as follows:

allowUnsafeConfigurations: true
  enabled: false
- name: rs0
  size: 3
          storage: 2Gi
  enabled: false

Apply the resulting YAML file as follows:

$ helm install my-db percona/psmdb-db --namespace psmdb -f values.yaml

Get expert help

If you need assistance, visit the community forum for comprehensive and free database knowledge, or contact our Percona Database Experts for professional support and services. Join K8S Squad to benefit from early access to features and “ask me anything” sessions with the Experts.

Last update: 2024-06-24