Skip to content
logo
Percona Operator for MongoDB
Install with Helm
Initializing search
    percona/k8spsmdb-docs
    percona/k8spsmdb-docs
    • Welcome
      • Design and architecture
      • Comparison with other solutions
      • Install with Helm
        • Pre-requisites
        • Installation
        • Installing Percona Server for MongoDB with customized parameters
      • Install with kubectl
      • System requirements
      • Install on Minikube
      • Install on Google Kubernetes Engine (GKE)
      • Install on Amazon Elastic Kubernetes Service (AWS EKS)
      • Install on Microsoft Azure Kubernetes Service (AKS)
      • Generic Kubernetes installation
      • Install on OpenShift
      • Application and system users
      • Changing MongoDB options
      • Anti-affinity and tolerations
      • Labels and annotations
      • Exposing the cluster
      • Local storage support
      • Arbiter and non-voting nodes
      • MongoDB sharding
      • Transport encryption (TLS/SSL)
      • Data at rest encryption
      • Telemetry
        • About backups
        • Configure storage for backups
        • Making scheduled backups
        • Making on-demand backup
        • Storing operations logs for point-in-time recovery
        • Restore from a previously saved backup
        • Delete the unneeded backup
      • Upgrade MongoDB and the Operator
      • Horizontal and vertical scaling
      • Multi-cluster and multi-region deployment
      • Monitor with Percona Monitoring and Management (PMM)
      • Add sidecar containers
      • Restart or pause the cluster
      • Debug and troubleshoot
      • OpenLDAP integration
      • How to use private registry
      • Creating a private S3-compatible cloud for backups
      • Restore backup to a new Kubernetes-based environment
      • How to use backups to move the external database to Kubernetes
      • Install Percona Server for MongoDB in multi-namespace (cluster-wide) mode
      • Upgrading Percona Server for MongoDB manually
      • Custom Resource options
      • Percona certified images
      • Operator API
      • Frequently asked questions
      • Old releases (documentation archive)
      • Release notes index
      • Percona Operator for MongoDB 1.14.0 (2023-03-13)
      • Percona Operator for MongoDB 1.13.0 (2022-09-15)
      • Percona Operator for MongoDB 1.12.0 (2022-05-05)
      • Percona Distribution for MongoDB Operator 1.11.0 (2021-12-21)
      • Percona Distribution for MongoDB Operator 1.10.0 (2021-09-30)
      • Percona Distribution for MongoDB Operator 1.9.0 (2021-07-29)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.8.0 (2021-05-06)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.7.0 (2021-03-08)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.6.0 (2020-12-22)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.5.0 (2020-09-07)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.4.0 (2020-03-31)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.3.0 (2019-12-11)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.2.0 (2019-09-20)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.1.0 (2019-07-15)
      • Percona Kubernetes Operator for Percona Server for MongoDB 1.0.0 (2019-05-29)

    • Pre-requisites
    • Installation
    • Installing Percona Server for MongoDB with customized parameters

    Install Percona Server for MongoDB using Helm¶

    Helm is the package manager for Kubernetes. Percona Helm charts can be found in percona/percona-helm-charts repository on Github.

    Pre-requisites¶

    Install Helm following its official installation instructions.

    Note

    Helm v3 is needed to run the following steps.

    Installation¶

    1. Add the Percona’s Helm charts repository and make your Helm client up to date with it:

      $ helm repo add percona https://percona.github.io/percona-helm-charts/
      $ helm repo update
      
    2. Install Percona Operator for MongoDB:

      $ helm install my-op percona/psmdb-operator
      

      The my-op parameter in the above example is the name of a new release object which is created for the Operator when you install its Helm chart (use any name you like).

      Note

      If nothing explicitly specified, helm install command will work with the default namespace and the latest version of the Helm chart.

      • To use different namespace, provide its name with the following additional parameter: --namespace my-namespace.

      • To use different Helm chart version, provide it as follows: --version 1.14.0

    3. Install Percona Server for MongoDB:

      $ helm install my-db percona/psmdb-db --namespace my-namespace
      

      The my-db parameter in the above example is the name of a new release object which is created for the Percona Server for MongoDB when you install its Helm chart (use any name you like).

    Installing Percona Server for MongoDB with customized parameters¶

    The command above installs Percona Server for MongoDB with default parameters. Custom options can be passed to a helm install command as a --set key=value[,key=value] argument. The options passed with a chart can be any of the Operator’s Custom Resource options.

    Note

    Parameters from the Replica Set section are treated differently: if you specify any parameter from replsets, the Operator will not use default values for this Replica Set. So do not specify Replica Set options at all or specify all needed options for the Replica Set.

    The following example will deploy 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.14.0 --namespace psmdb \
      --set "replsets[0].name=rs0" --set "replsets[0].size=3" \
      --set "replsets[0].volumeSpec.pvc.resources.requests.storage=20Gi" \
      --set backup.enabled=false --set sharding.enabled=false
    

    Also it can be more convenient in some cases to specify customized options in a YAML file instead of using separate command line parameters. The resulting file similar to the above example looks as follows:

    values.yaml
    allowUnsafeConfigurations: true
    sharding:
      enabled: false
    replsets:
    - name: rs0
      size: 3
      volumeSpec:
        pvc:
          resources:
            requests:
              storage: 2Gi
    backup:
      enabled: false
    

    Apply the resulting YAML file as follows:

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

    Contact Us

    For free technical help, visit the Percona Community Forum.

    To report bugs or submit feature requests, open a JIRA ticket.

    For paid support and managed or consulting services , contact Percona Sales.


    Last update: 2023-05-23
    Percona LLC and/or its affiliates, © 2009 - 2023
    Made with Material for MkDocs

    Cookie consent

    We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.