| title | Deploy Availability Groups on AKS with DH2i DxOperator and Rancher by SUSE | ||
|---|---|---|---|
| description | Set up an availability group in SQL Server on Kubernetes using DH2i DxOperator and Rancher by SUSE. | ||
| author | amitkh-msft | ||
| ms.author | amitkh | ||
| ms.reviewer | randolphwest | ||
| ms.date | 01/02/2026 | ||
| ms.service | sql | ||
| ms.subservice | linux | ||
| ms.topic | tutorial | ||
| ms.custom |
|
Deploy SQL Server containers and availability group with DH2i DxOperator on Azure Kubernetes Service via Rancher
[!INCLUDE SQL Server - Linux]
This tutorial provides instructions on setting up [!INCLUDE ssnoversion-md] configured with Always On availability groups (AGs) in an Azure Kubernetes Service (AKS) cluster. It utilizes the DH2i DxOperator and Rancher Prime from SUSE for deployment.
Note
Starting in [!INCLUDE sssql25-md], SUSE Linux Enterprise Server (SLES) isn't supported.
Microsoft supports data movement, AG, and [!INCLUDE ssnoversion-md] components. DH2i is responsible for support of the DxEnterprise product, which includes cluster and quorum management.
Note
DxOperator is a software extension to Kubernetes that uses custom resource definitions to automate the deployment of DxEnterprise clusters. DxEnterprise then provides all of the instrumentation to create, configure, manage, and provide automatic failover for [!INCLUDE ssnoversion-md] AG workloads in Kubernetes. You can register for a free DxEnterprise software license. For more information, see the DxOperator Quick Start Guide. For support issues, contact SUSE directly.
This tutorial consists of the following steps:
[!div class="checklist"]
- Configure Rancher Prime on AKS
- Install DxOperator
- Deploy SQL Server containers and configure the always on availability groups using the DH2i DxOperator
- Connect and manage [!INCLUDE ssnoversion-md] containers using SQL Server Management Studio (SSMS).
-
An Azure Kubernetes Service (AKS) or Kubernetes cluster.
-
A valid DxEnterprise license with AG features and tunnels enabled. For more information, see the developer edition for nonproduction usage, or DxEnterprise software for production workloads.
Follow the instructions provided in the Quickstart: Deploy an Azure Kubernetes Service (AKS) cluster using Azure CLI article.
After you install your Kubernetes cluster, follow the instructions in Installing Rancher on Azure Kubernetes Service from Step 4, where you access the credentials of the Kubernetes cluster and install Rancher.
-
Sign in to the Rancher portal via the web UI.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-prime.png" alt-text="Screenshot of Rancher web UI." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-prime.png":::
-
To proceed, select the Kubernetes cluster where you want to install DxOperator. In this example, choose a local cluster that also has Rancher deployed. However, you should import or add another Kubernetes cluster and use that cluster for deploying SQL Server, to avoid Rancher and SQL Server pods running on same Kubernetes cluster.
-
From the left hand menu, Select App > Charts.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-charts.png" alt-text="Screenshot showing the available chart options." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-charts.png":::
-
Search for DxOperator and select Install.
- Select Next and then Install.
- Wait for the installation to complete before proceeding.
-
Add secrets for SQL Server and the DxEnterprise cluster passkeys.
-
Navigate to Storage > Secrets > Create.
-
Choose Opaque as your secret option, and enter the secret name
dxe. -
Provide the key name as
DX_PASSKEY, and value of the DxEnterprise cluster passkey. -
Select Add.
-
Add the key name as
DX_LICENSE, with value of the DxEnterprise license key. -
Select Create to finish creating the license key.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-secrets.png" alt-text="Screenshot of the license and passkey secrets." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-secrets.png":::
-
Select Create to create a new secret, and then Opaque.
-
Enter name of secret as
mssql, set the key name asMSSQL_SA_PASSWORDwith a value of a strongsapassword. -
Select Create to finish creating the secret.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-password.png" alt-text="Screenshot of the password secret." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-password.png":::
-
-
Select Apps > Charts.
-
From the list of available charts, search for DxOperator - DxE + SQL Server AG.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-search-chart.png" alt-text="Screenshot of the search option." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-search-chart.png":::
-
Install the chart.
-
Select Install.
-
Once you select Install, provide the AG details as shown.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-availability-group.png" alt-text="Screenshot of the availability group settings." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-availability-group.png":::
-
Select Next.
-
Check the Create Load Balancers option to allow external access.
-
On the DxEnterprise options, check the Accept EULA option.
-
Select
dxeas cluster secret.:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-cluster-secret.png" alt-text="Screenshot of cluster secret." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-cluster-secret.png":::
-
On the SQL Server options, check Accept EULA.
-
Select
mssqlas SQL Server secret. -
Select Next and Install.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-cluster-options.png" alt-text="Screenshot of the cluster options." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-cluster-options.png":::
-
Once the installation is complete from the previous steps, get the external IP address to connect using [!INCLUDE ssmanstudiofull-md] (SSMS).
-
Navigate to Services, select
DxEnterprisesqlag-0-lb, and note the external IP (LB) address. -
Use the external IP address in SSMS to connect to the AG.
:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-external.png" alt-text="Screenshot of external IP address." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/rancher-external.png":::
-
In SSMS Object Explorer, expand Always On High Availability > Availability Groups.
-
Select
AG1> Show dashboard.:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/validation.png" alt-text="Screenshot of SSMS validation." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/validation.png":::
Simulate the failover to verify.
- From the Rancher web UI, select Workloads > Pods
- Select the
DxEnterprisesqlag-0pod - Select Delete, then select Delete again when prompted
Fetch the external IP address of the secondary pod.
-
Select Services on Rancher web UI
-
Select
DxEnterprisesqlag-1-lb -
Fetch the external/load balancer IP address
-
Connect to SSMS and view the AG dashboard
-
Observe that the role changed to Primary for
DxEnterprisesqlag-1:::image type="content" source="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/post-failover.png" alt-text="Screenshot of post failover." lightbox="media/tutorial-sql-server-containers-kubernetes-dxoperator-rancher-suse/post-failover.png":::
- Deploy availability groups on Kubernetes with DH2i DxOperator on Azure Kubernetes Service
- Deploy availability groups with DH2i DxEnterprise on Kubernetes
- Quickstart: Deploy a SQL Server container cluster on Azure or Red Hat OpenShift
- Deploy SQL Server Linux containers on Kubernetes with StatefulSets