---
title: "Walkthrough: Adding the DCRM connector module to Sitecore in Azure Kubernetes Service"
slug: "walkthrough--adding-the-dcrm-connector-module-to-sitecore-in-azure-kubernetes-service"
abstract: "How to add the Sitecore Connect for Microsoft Dynamics 365 for Sales connector to a Sitecore container environment in Azure Kubernetes Service"
---
# Walkthrough: Adding the DCRM connector module to Sitecore in Azure Kubernetes Service

You can add the Sitecore Connect for Microsoft Dynamics 365 for Sales (DCRM) connector in Azure Kubernetes Service (AKS).

This walkthrough describes how to:

- Build the DCRM images and push them to Azure.
- Prepare files and folders for deployment.
- Deploy the containers using *kubectl* commands.
- Update your Solr indexes.

<details>
<summary><h2>Build images and push them to Azure</h2></summary>

To build the images for DCRM and push them to Azure:

1. Build the images for DCRM as explained in [Walkthrough: Preparing to install the DCRM connector in a container environment](https://doc.sitecore.com/xp/en/developers/dynamics-crm-connect/80/sitecore-connect-for-microsoft-dynamics-365-for-sales/walkthrough--preparing-to-install-the-dcrm-connector-in-a-container-environment.html "Walkthrough: Preparing to install the DCRM connector in a container environment").
2. Open the Windows console, and use the `docker tag` command to tag the images. For example:

    ```text
    docker tag sitecore-dcrm-xp1-cm:8.0.0-1497 $registry/experimental/sitecore-dcrm-xp1-cm:sc103
    ```

3. In the console, use the `docker push` command to push the images to your Azure registry. For example:

    ```text
    docker push $registry/sitecore-dcrm-xp1-cm:sc103
    ```

</details>

<details>
<summary><h2>Prepare files and folders for deployment</h2></summary>

To prepare files and folders in your installation for deployment:

1. Download the Sitecore DCRM container deployment package from the [Sitecore download page](https://dev.sitecore.net/Downloads/Dynamics_CRM_Connect.aspx) and extract it to a folder on your local workstation.
2. Open the folder that you extracted the Sitecore DCRM container deployment package to.
3. Navigate to the `dcrm\k8s\<version>` folder, for example, `dcrm\k8s\ltsc2019`. Copy the `overrides` subfolder to the Sitecore Experience Platform (SXP) container deployment package folder `k8s\<version>` (on the same level as the *xp1* folder).
4. In the SXP container deployment package, in each of the `overrides\<topology>`, `overrides\<topology>\init`, and `overrides\<topology>\secrets` folders, locate the `kustomization.yaml` file. In each file, update the `bases` parameter with the appropriate folder names for your installation, for example, `../../xp1`.

    > [!note]
    > The `bases` parameter contains the placement of the original Sitecore container deployment files that the `kustomization.yaml` files override.

5. In each of the `kustomization.yaml` files, in the `images:` section, update the `newName` and `newTag` parameters with the values for the images you pushed to the Azure Registry, for example, `mssql-init`, `cm`, `xdbcollection`, `xdbsearch`, and `xdbsearchworker` .

    > [!note]
    > To find the values you need for, for example, the `mssql-init` image, go to the Azure Container Registry, search for your `sitecore-dcrm-xp1-mssql-init` image, and take the values from that image.

6. In the `overrides\xp1\secrets` folder, in the `sitecore-data-exchange-staging.txt` and `sitecore-dcrm.txt` files , update the connection string details.

    > [!note]
    > The files contain an example of how the connection string must look.

</details>

<details>
<summary><h2>Deploy the containers</h2></summary>

Prepare the AKS cluster configuration and deploy the ingress controller. For information on how to do this, see the *Installation Guide for Production Environment for Kubernetes* which is available on the [Sitecore download page](https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx).

To deploy the containers and the necessary Kubernetes components:

1. Open the Windows console, and navigate to the folder containing the `xp1` and `overrides` folders.
2. Deploy the secrets. Use this command:

    ```text
    kubectl apply -k ./overrides/<topology>/secrets/
    ```

3. Run the `external` folder. Use this command:

    ```text
    kubectl apply -k ./<topology>/external/
    ```

4. Wait for all containers to have the status *Ok/Running*. You can check the status with this command:

    ```text
    kubectl get pods -o wide
    ```

5. Run the `init` folder. Use this command:

    ```text
    kubectl apply -k ./overrides/<topology>/init/
    ```

6. Wait for all containers to have the status *Completed*. You can check the status with this command:

    ```text
    kubectl get pods
    ```

7. To create persistent volumes, run this command:

    ```text
    kubectl apply -f ./xp1/volumes/azurefile
    ```

8. Run the Sitecore containers with the DCRM changes. Use this command:

    ```text
    kubectl apply -k ./overrides/<topology>/
    ```

9. Wait for all containers to have the status *Ok/Running*. You can check the status with the `kubectl get pods` command.
10. Update the local host file. For information on how to do this, see the *Installation Guide for Production Environment for Kubernetes*, which is available on the Sitecore download page.

When the containers have been deployed, [rebuild your search indexes](https://doc.sitecore.com/xp/en/developers/dynamics-crm-connect/80/sitecore-connect-for-microsoft-dynamics-365-for-sales/rebuild-the-search-indexes.html "Rebuild the search indexes").

</details>