Walkthrough: Adding Tenant Service module to Sitecore in Azure Kubernetes Service
Guide to adding the Sitecore Data Exchange Framework Tenant Service module to a container environment using Azure Kubernetes Service.
You can add Data Exchange Framework (DEF) Tenant Service (TS) to a container environement in Azure Kubernetes Service (AKS).
Note
For AKS deployments, the preferrred URLs for TS connection strings are:
host=http://cm.default.svc.cluster.local; auth endpoint=http://id.default.svc.cluster.local/
This walkthrough describes how to:
Prepare files and folders for deployment.
Deploy the AKS containers using kubectl commands..
To prepare files and folders in your Kubernetes installation for deployment:
Download the Sitecore Experience Platform (SXP) container deployment package from the Sitecore download page. Extract the package and save it, with the folder structure intact, in a temporary folder on your local machine.
Download the DEF-TS container deployment package from the Sitecore download page. Extract it to your local workstation with the folder structure intact.
In the DEF-TS container deployment folder, copy the
def-ts\k8s\ltsc2019\overrides\<topology>
folder to the clipboard.In the Sitecore Experience Platform (SXP) container deployment package, navigate to the
K8s\<version>\overrides
folder, and paste in thedef-ts\k8s\ltsc2019\overrides\<topology>
folder (from the clipboard) asts-<topology>
(at the same level as thedef topology
folder).In the SXP container deployment package, in the
overrides\ts-<topology>\ingress-nginx
folder, locate thekustomization.yaml
file. Make sure that parameters in thebases:
section are overlays with the Sitecore SXPingress-nginx
folder for your installation, for example,../../../xp1/ingress-nginx
.In the SXP container deployment package, in each of the
overrides\ts-<topology>
andoverrides\ts-<topology>\secrets
folders, locate thekustomization.yaml
file. In each file, make sure that parameters in thebases
section are overlays with the Sitecore DEFoverrides
folder respectively for your installation, for example,../xp1
.Note
Parameters in the
bases:
section contain the placement of the original Sitecore container deployment files or Sitecore DEF deployment files that thekustomization.yaml
files override.In the
overrides\ts-<topology>\kustomization.yaml
file, in theimages:
section, make sure thenewName
andnewTag
parameters have the appropriate values for the TS images.In the
overrides\ts-<topology>\secrets
folder, open thetenant-service-sitecore-connection.txt
file and update the connection string details. The file contains an example of how the connection string should look.In the
overrides\ts-<topology>\secrets\tls\global-ts
folder, add the TLS certificatestsl.crt
andtls.key
for thets.globalhost
host. To add HTTP/TLS certificates for the Tenant Service, see the Installation Guide for Production Environment with Kubernetes guide.
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.
To deploy the container and the necessary Kubernetes components:
Open the Windows console, and navigate to the
k8s\<version>
folder.Deploy the secrets. Use this command:
kubectl apply -k ./overrides/ts-<topology>/secrets/
Run the
ingress
folder. Use this command:kubectl apply -k ./overrides/ts-<topology>/ingress-nginx/
Run the
external
folder. Use this command:kubectl apply -k ./<topology>/external/
Wait for all containers to have the status Ok/Running. You can check the status with this command:
kubectl get pods -o wide
Run the
init
folder. Use this command:kubectl apply -k ./<topology>/init/
Wait for all containers to have the status Completed. You can check the status with this command:
kubectl get pods
To create persistent volumes, run this command:
kubectl apply -f ./<topology>/volumes/azurefile
Run the Sitecore containers with the SFCRM changes. Use this command:
kubectl apply -k ./overrides/ts-<topology>/
Wait for all containers to have the status Ok/Running. You can check the status with the
kubectl get pods
command. Obtain the external IP address by using this command:kubectl get service -l app=nginx-ingress
Update the local host file with the external IP address. For information on how to do this, see the Installation Guide for Production Environment for Kubernetes, which is available on the Sitecore download page.
To check that the service is running, open a browser, and browse to
https:\\ts.globalhost
.Note
If you get a Your connection isn't private response, click Advanced, then click Continue to ts.globalhost (unsafe) to continue.