Scale Percona Server for MongoDB on Kubernetes and OpenShift¶
One of the great advantages brought by Kubernetes and the OpenShift platform is the ease of an application scaling. Scaling a Deployment up or down ensures new Pods are created and set to available Kubernetes nodes.
The size of the cluster is controlled by the
size key in the
Custom Resource options
The Operator will not allow to scale Percona Server for MongoDB with the
kubectl scale statefulset <StatefulSet name> command as it puts
configuration options out of sync.
You can change size separately for different components of your cluster by setting this option in the appropriate subsections:
- replsets.size allows to set the size of the MongoDB Replica Set,
- replsets.arbiter.size allows to set the number of Replica Set Arbiter instances,
- sharding.configsvrReplSet.size allows to set the number of Config Server instances,
- sharding.mongos.size allows to set the number of mongos instances.
For example, the following update in
deploy/cr.yaml will set the size of the
MongoDB Replica Set to
.... replsets: .... size: 5 ....
Don’t forget to apply changes as usual, running the
kubectl apply -f deploy/cr.yaml command.
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.