Install Percona Server for MongoDB using Helm¶
Helm is the package manager for Kubernetes. A Helm chart is a package that contains all the necessary resources to deploy an application to a Kubernetes cluster.
You can find Percona Helm charts in percona/percona-helm-charts repository in Github.
Prerequisites¶
To install and deploy the Operator, you need the following:
- Helm v3 .
- kubectl command line utility.
-
A Kubernetes environment. You can deploy it locally on Minikube for testing purposes or using any cloud provider of your choice. Check the list of our officially supported platforms.
Installation¶
Here’s a sequence of steps to follow:
-
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
-
It is a good practice to isolate workloads in Kubernetes via namespaces. Create a namespace:
$ kubectl create namespace <namespace>
-
Install Percona Operator for MongoDB:
$ helm install my-op percona/psmdb-operator --namespace <namespace>
The
namespace
is the name of your namespace. Themy-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). -
Install Percona Server for MongoDB:
$ helm install cluster1 percona/psmdb-db --namespace <namespace>
The
cluster1
parameter 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). -
Check the Operator and the Percona Server for MongoDB Pods status.
$ kubectl get psmdb -n <namespace>
The creation process may take some time. When the process is over your cluster obtains the
ready
status.Expected output
NAME ENDPOINT STATUS AGE my-cluster-name cluster1-mongos.default.svc.cluster.local ready 5m26s
You have successfully installed and deployed the Operator with default parameters.
The default Percona Server for MongoDB configuration includes three mongod, three mongos, and three config server instances with enabled sharding.
You can find in the documentation for the charts which Operator and database parameters can be customized during installation. Also, you can check the rest of the Operator’s parameters in the Custom Resource options reference.
Next steps¶
Connect to Percona Server for MongoDB
Useful links¶
Install Percona Server for MongoDB with customized parameters