Skip to main content

MarkLogic Server on Kubernetes

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:

  1. Update the chart repository to get the new version of the chart:

    helm repo update
  2. Check the upgrades available for MarkLogic Kubernetes Helm Chart:

    helm search repo marklogic 
  3. Set the upgrade strategy in the values.yaml file to OnDelete:

    updateStrategy: 
        type: OnDelete
  4. Update the values.yaml file with the new values from the updated chart version.

  5. Run the Helm upgrade command. Specify the name of your release and the new chart version using the --version option. Specify the values.yaml file using the -f option:

    helm upgrade <your release> marklogic/marklogic -f values.yaml --version <new version> -n <release-namespace> 
    
  6. 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.

  7. Repeat step 6 for all pods in your release.

  8. 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:

  1. Update the image.repository and image.tag in the values.yaml file to the version of MarkLogic to upgrade to:

    image:
      repository: marklogicdb/marklogic-db
      tag: <new tag>
  2. Set upgradeStrategy in the values.yaml file to OnDelete:

    updateStrategy: 
        type: OnDelete
  3. Upgrade the Helm Chart using the helm upgrade command with the release name, chart name, and values.yaml:

    helm upgrade <release-name> <chart-name> -f <values.yaml> --version <chart-version> -n <release-namespace> 
    
  4. 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.
  5. 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.

  6. 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.

  7. 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
  1. 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.

  2. 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.
    
  3. Monitor the pod status with this command:

    kubectl get pods --nampespace=<your-namespace> -w 
    
  4. As soon as all pods are back running, verify the upgrade by checking the version or by running the required tests.