Upgrade procedures
This section describes three upgrade procedures.
Upgrade MarkLogic Helm Chart version
When a new version of the MarkLogic Helm Chart is released, upgrade to the new version by following these steps:
Update the chart repository to get the new version of the chart:
helm repo update
Check the upgrades available for MarkLogic Kubernetes Helm Chart:
helm search repo marklogic
Set the upgrade strategy in the
values.yaml
file toOnDelete
:updateStrategy: type: OnDelete
Update the
values.yaml
file with the new values from the updated chart version.Run the Helm upgrade command. Specify the name of your release and the new chart version using the
--version
option. Specify thevalues.yaml
file using the-f
option:helm upgrade <your release> marklogic/marklogic -f values.yaml --version <new version> -n <release-namespace>
To start the upgrade, terminate the pod with the smallest ordinal that is running a bootstrap node:
kubectl delete pod <pod-name>-n <release-namespace>
For example:
kubectl delete pod dnode-group-marklogic-0 -n marklogic
Once the pod is terminated, a new pod will be created with the updated Helm Chart version.
Repeat step 6 for all pods in your release.
Complete the upgrade process.
Upgrade Marklogic version in your release
Note
If a cluster is a multi-group MarkLogic cluster, each release corresponding to a group should be upgraded using the following procedure. If all the nodes in the groups are not updated to the same MarkLogic version, then differences in the version and effective version of the MarkLogic cluster will exist.
MarkLogic Kubernetes Helm Chart releases are independent of MarkLogic Server releases. An upgrade may be required when there is a new MarkLogic Server version available.
MarkLogic Server also uses the major, minor, and patch release classification. For further information, see MarkLogic Upgrade Support.
To upgrade the MarkLogic version in your release, follow these steps:
Update the
image.repository
andimage.tag
in thevalues.yaml
file to the version of MarkLogic to upgrade to:image: repository: marklogicdb/marklogic-db tag: <new tag>
Set
upgradeStrategy
in thevalues.yaml
file toOnDelete
:updateStrategy: type: OnDelete
Upgrade the Helm Chart using the
helm upgrade
command with the release name, chart name, andvalues.yaml
:helm upgrade <release-name> <chart-name> -f <values.yaml> --version <chart-version> -n <release-namespace>
Use this command to start the upgrade by deleting the pod with the smallest ordinal that is a MarkLogic bootstrap host:
kubectl delete pod <pod-name> -n <release-namespace>.
For example,:
kubectl delete pod dnode-group-marklogic-0.
Once the pod is terminated, a new pod will be created with an updated MarkLogic version. New values will also be updated in the
values.yaml
file.To complete the upgrade, repeat the termination process for all the pods in your release. After all the pods are upgraded, access the Admin UI on the bootstrap host and check that there is a configuration and/or a security database upgrade and/or an effective version change. If there is, a prompt to click OK to upgrade appears. If the prompt does not appear, the process is finished.
Verify the upgrade by checking the version of MarkLogic on the Admin UI or by accessing the server logs. Required tests can now be run.
Upgrade MarkLogic and the Helm Chart at the same time
To upgrade the MarkLogic and Helm Chart versions at the same time, follow steps 1-5 in Upgrade MarkLogic Helm Chart version and steps 1-3 in Upgrade Marklogic version in your release.
Next, initiate terminating the pods. First, delete pod-0 (the pod running the MarkLogic bootstrap host). Then delete the other pods using a command like this one:
kubectl delete pod <pod-name> -n <release-namespace>.
For example:
kubectl delete pod dnode-group-marklogic-0 -n marklogic.
Monitor the pod status with this command:
kubectl get pods --nampespace=<your-namespace> -w
As soon as all pods are back running, verify the upgrade by checking the version or by running the required tests.