Modify replica counts on an existing installation¶
Kubernetes deployments¶
To modify replica counts for MSR resources using MSR Operator:
You can use the kubectl apply command on your custom resource manifest to modify replica counts across MSR resources.
For information on how many RethinkDB replicas to use, refer to the RethinkDB replica count table.
In the
cr-sample-manifest.yaml
file, edit the key-value pair that corresponds to the MSR resource whose replica count you want to modify. For example,nginx
:Note
For the full configuration example, refer to the CRD file sample.
nginx: replicaCount: <desired-replica-count>
Invoke the following command to run the webhook health check and apply the changes to the custom resource:
kubectl wait --for=condition=ready pod -l \ app.kubernetes.io/name="msr-operator" && kubectl apply -f cr-sample-manifest.yaml
Verify completion of the reconciliation process:
kubectl get msrs.msr.mirantis.com kubectl get rethinkdbs.rethinkdb.com
To troubleshoot the reconciliation process, run the following commands:
kubectl describe msrs.msr.mirantis.com kubectl describe rethinkdbs.rethinkdb.com
Review the MSR Operator Pod logs for more detailed results:
kubectl logs <msr-operator-pod-name>
Optional. Another way to troubleshoot the reconciliation process is to monitor the cluster scaling in the RethinkDB admin console.
To modify replica counts for MSR resources using a Helm chart:
You can use the helm upgrade command to modify replica counts across non-RethinkDB MSR resources. For the RethinkDB resources, refer to Modify replica counts for RethinkDB resources.
In the
ha.yaml
file, edit the key-value pair that corresponds to the MSR resource whose replica count you wish to modify. For example,nginx
:Note
For the full configuration example, refer to The ha.yaml file sample.
nginx: replicaCount: <desired-replica-count>
To apply the new values, run the helm upgrade command:
helm upgrade msrofficial/msr –-version 1.0.0 -f ha.yaml
Swarm deployments¶
Enable all authenticated users, including service accounts, to schedule services and perform tasks on all nodes.
Note
If you are using MSR in conjunction with MKE, refer to Schedule services deployment on manager and MSR nodes for detailed information.
SSH into a manager node.
Verify that you have the
values.yaml
that you generated to install and modify your MSR deployment.Scale your deployment to the required number of worker nodes:
docker run \ --rm \ -it \ -v /var/run/docker.sock:/var/run/docker.sock \ -v <path-to-values.yml>:/config/values.yml \ registry.mirantis.com/msr/msr-installer:<msr-version> \ apply --replicas <number-of-replicas>
Important
Because RethinkDB uses a raft consensus algorithm to ensure data consistency and fault tolerance, you must install MSR onto an odd number of worker nodes.
Review the status of the deployed services:
docker stack services msr