---
title: "Walkthrough: Installing Data Exchange Framework in Azure Kubernetes Service"
slug: "walkthrough--installing-data-exchange-framework-in-azure-kubernetes-service"
abstract: "How to install Data Exchange Framework in a container environment using Azure Kubernetes Service."
---
# Walkthrough: Installing Data Exchange Framework in Azure Kubernetes Service

You can install Data Exchange Framework (DEF) in a container environment using Azure Kubernetes Service (AKS).This walkthrough describes how to:

- Push images to Azure
- Prepare configuration files for deployment
- Deploy the containers

<details>
<summary><h2>Push images to Azure</h2></summary>

To push the image files for DEF to Azure:

1. You must prepare the installation files and images as explained in [Walkthrough: Preparing to install Data Exchange Framework in a container environment](https://doc.sitecore.com/xp/en/developers/def/90/data-exchange-framework/walkthrough--preparing-to-install-data-exchange-framework-in-a-container-environment.html "Walkthrough: Preparing to install Data Exchange Framework in a container environment").
2. Tag the images with the `docker tag` command. For example:

    ```text
    docker tag sitecore-def-xp0-assets:6.0.0.01525.109-10.0.19042.804-2009 $registry/experimental/def/sitecore-xp1-cm:sc101def
    ```

3. Push the images to your Azure registry with the `docker push` command. For example:

    ```text
    docker push $registry/experimental/def/sitecore-xp1-cm:sc101def
    ```

</details>

<details>
<summary><h2>Prepare configuration files for deployment</h2></summary>

To prepare configuration files in your installation for deployment:

1. Open the folder where you extracted the Data Exchange Framework container deployment package.
2. Navigate to the `DEF.Asset\k8s\<version>` folder, for example, `DEF.Asset\k8s\ltsc2019`. Copy the `overrides` subfolder to the Sitecore Experience Platform (SXP) container deployment package, in the `k8s\<version>` folder (on the same level as the `xp1` folder).
3. In the SXP container deployment package, in each of the `overrides\<topology>`, and `overrides\<topology>\secrets` folders, locate the `kustomization.yaml` file. In each file, update parameters in the `bases` section with the appropriate folder names for your installation, for example, `../../xp1`.

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

4. In each `kustomization.yaml` file, in the `images:` section, update the `newName` and `newTag` parameters with the values for the images you pushed to the Azure Registry, for example `cm`, `cd`, `xdbautomationworker`, and `id`.

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

5. If you are deploying the XP1 topology, in the `overrides\<topology>\secrets` folder, in the `sitecore-tenant-service-connection-string.txt` file, update the connection string details. The file contains an example of the connection string.

</details>

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

Before you deploy the containers to Kubernetes, you must 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 `k8s\<version>` folder.
2. Deploy the secrets:
    - If you are using the XP1 topology, run the following command:

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

    - If you are using the XM1 topology, run the following command:

        ```text
        kubectl apply -k ./<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 ./<topology>/init/
    ```

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

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

7. To create persistent volumes, run this command:

    ```text
    kubectl apply -f ./<topology>/volumes/azurefile
    ```

8. Run the Sitecore containers with the SFCRM 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 this command :

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

10. Obtain the external IP address. Use this command:

    ```text
    kubectl get service -l app=nginx-ingress
    ```

11. 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](https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx).

> [!note]
> When the containers have been deployed, [rebuild your search indexes](https://doc.sitecore.com/xp/en/developers/salesforce-marketing-cloud/80/sitecore-connect-for-salesforce-marketing-cloud/rebuild-the-search-indexes-999546.html).

</details>