Skip to main content

Walkthrough: Upgrading DCRM on Kubernetes


How to upgrade the Sitecore Connect for Microsoft Dynamics 365 for Sales connector on a Sitecore container environment using Azure Kubernetes Service

This topic explains how you upgrade DCRM Container in AKS from version 6.0 to 7.0.

Before you perform the upgrade for Container DCRM Container 6.0 to DCRM 7.0, you must have a Sitecore AKS 10.1 deployment with DCRM 6.0 and an up to date backup of the 10.1 database.

This walkhthrough describes how to:

  • Build and push the mssql-upgrade image

  • Perform upgrade

To upgrade DCRM you must build an mssql-upgrade image.

To build and push the mssql-upgrade image:

  1. Build the images for DCRM as explained in the Build the mssql-upgrade image section in Walkthrough: Upgrading DCRM on Docker.

  2. In a PowerShell window, navigate to the folder containing the Dockerfile and build and tag the image. For example:

    docker build . -t sitecore-dcrm-xp1-cm:<imageVersionTag> $registry/sitecore-dcrm-xp1-cm:<newTag>
  3. Check that Docker has created the image.

  4. Push the created image to your Azure registry. For example:

    docker push $registry/sitecore-dcrm-xp1-cm:<newTag>

To upgrade to DCRM 7.0 on Sitecore 10.2:

  1. Download and extract Sitecore 10.2 Sitecore Container Deployment Package from the Sitecore download page. Extract it to your local workstation with the folder structure intact.

  2. Navigate to the upgrade folder for the Windows version and topology you are using, for example, k8s\ltsc2019\upgrade\xp1. In the kustomization.yaml file, update the images section with newName and newTag of the custom mssql-upgrade image you created and pushed previously.

  3. In the configuration folder, update the secrets files. For more information on the secrets files, see the Installation Guide for Production Environment with Kubernetes available on the Sitecore download page.

  4. Download the DCRM container deployment 7.0 package from the Sitecore download page. Extract it to your local workstation with the folder structure intact. Copy the dcrm\k8s\<windows version>\overrides folder and paste it into the \k8s\<windows version>\ folder in the SXP 10.2 deployment structure.

  5. In the secrets folder in the SXP 10.2 structure, for example, k8s\ltsc2019\overrides\xp1\secrets, update these secrets files:

    • sitecore-data-exchange-staging.txt

    • sitecore-dcrm.txt

  6. Log in to the Azure CLI and set a subscription.

    az login
    az account set --subscription "Your Subscription"
  7. Get the credentials for the Kubernetes cluster that was created with the AKS cluster.

    zaks get-credentials --resource-group <10.1 resource group>--name <10.1 cluster>
  8. To deploy the Sitecore upgrade job, go to the folder where the updated files are, for example k8s\ltsc2019\upgrade\xp1, and run this command:

    kubectl apply -k .\
  9. To check if the job has completed, run this command:

    kubectl get pod
  10. When the upgrade process is completed, you can delete the Kubernetes upgrade job and upgrade secrets. In the console, go to the upgrade folder from step 2, and run these commands:

    kubectl delete -f .\
    kubectl delete -k .\


Upgrading with a custom mssql-image includes cleaning up DCRM items from the database since DCRM 7.0 has moved to using resources files. This requires rebuilding and upgrading the Sitecore role instances cm, xconnect and xdbsearchworker.

For detailed instructions on how to build and deploy the Sitecore role instances, see the Sitecore Upgrade Container Deployment Guide on the Sitecore download page.