You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,7 +4,7 @@ description: Set up an availability group in SQL Server on Kubernetes using DH2i
4
4
author: aravindmahadevan-ms
5
5
ms.author: armaha
6
6
ms.reviewer: amitkh, randolphwest
7
-
ms.date: 04/10/2024
7
+
ms.date: 08/20/2024
8
8
ms.service: sql
9
9
ms.subservice: linux
10
10
ms.topic: tutorial
@@ -49,77 +49,77 @@ This tutorial shows an example of an AG with three replicas. You need:
49
49
apiVersion: v1
50
50
kind: Service
51
51
metadata:
52
-
name: dxemssql-0
52
+
name: dxemssql-0
53
53
spec:
54
-
clusterIP: None
55
-
selector:
54
+
clusterIP: None
55
+
selector:
56
56
statefulset.kubernetes.io/pod-name: dxemssql-0
57
-
ports:
58
-
- name: dxl
59
-
protocol: TCP
60
-
port: 7979
61
-
- name: dxc-tcp
62
-
protocol: TCP
63
-
port: 7980
64
-
- name: dxc-udp
65
-
protocol: UDP
66
-
port: 7981
67
-
- name: sql
68
-
protocol: TCP
69
-
port: 1433
70
-
- name: listener
71
-
protocol: TCP
72
-
port: 14033
57
+
ports:
58
+
- name: dxl
59
+
protocol: TCP
60
+
port: 7979
61
+
- name: dxc-tcp
62
+
protocol: TCP
63
+
port: 7980
64
+
- name: dxc-udp
65
+
protocol: UDP
66
+
port: 7981
67
+
- name: sql
68
+
protocol: TCP
69
+
port: 1433
70
+
- name: listener
71
+
protocol: TCP
72
+
port: 14033
73
73
---
74
74
apiVersion: v1
75
75
kind: Service
76
76
metadata:
77
-
name: dxemssql-1
77
+
name: dxemssql-1
78
78
spec:
79
-
clusterIP: None
80
-
selector:
79
+
clusterIP: None
80
+
selector:
81
81
statefulset.kubernetes.io/pod-name: dxemssql-1
82
-
ports:
83
-
- name: dxl
84
-
protocol: TCP
85
-
port: 7979
86
-
- name: dxc-tcp
87
-
protocol: TCP
88
-
port: 7980
89
-
- name: dxc-udp
90
-
protocol: UDP
91
-
port: 7981
92
-
- name: sql
93
-
protocol: TCP
94
-
port: 1433
95
-
- name: listener
96
-
protocol: TCP
97
-
port: 14033
82
+
ports:
83
+
- name: dxl
84
+
protocol: TCP
85
+
port: 7979
86
+
- name: dxc-tcp
87
+
protocol: TCP
88
+
port: 7980
89
+
- name: dxc-udp
90
+
protocol: UDP
91
+
port: 7981
92
+
- name: sql
93
+
protocol: TCP
94
+
port: 1433
95
+
- name: listener
96
+
protocol: TCP
97
+
port: 14033
98
98
---
99
99
apiVersion: v1
100
100
kind: Service
101
101
metadata:
102
-
name: dxemssql-2
102
+
name: dxemssql-2
103
103
spec:
104
-
clusterIP: None
105
-
selector:
104
+
clusterIP: None
105
+
selector:
106
106
statefulset.kubernetes.io/pod-name: dxemssql-2
107
-
ports:
108
-
- name: dxl
109
-
protocol: TCP
110
-
port: 7979
111
-
- name: dxc-tcp
112
-
protocol: TCP
113
-
port: 7980
114
-
- name: dxc-udp
115
-
protocol: UDP
116
-
port: 7981
117
-
- name: sql
118
-
protocol: TCP
119
-
port: 1433
120
-
- name: listener
121
-
protocol: TCP
122
-
port: 14033
107
+
ports:
108
+
- name: dxl
109
+
protocol: TCP
110
+
port: 7979
111
+
- name: dxc-tcp
112
+
protocol: TCP
113
+
port: 7980
114
+
- name: dxc-udp
115
+
protocol: UDP
116
+
port: 7981
117
+
- name: sql
118
+
protocol: TCP
119
+
port: 1433
120
+
- name: listener
121
+
protocol: TCP
122
+
port: 14033
123
123
```
124
124
125
125
1. Run the following command to apply the configuration.
@@ -139,64 +139,64 @@ This tutorial shows an example of an AG with three replicas. You need:
139
139
apiVersion: apps/v1
140
140
kind: StatefulSet
141
141
metadata:
142
-
name: dxemssql
142
+
name: dxemssql
143
143
spec:
144
-
serviceName: "dxemssql"
145
-
replicas: 3
146
-
selector:
144
+
serviceName: "dxemssql"
145
+
replicas: 3
146
+
selector:
147
147
matchLabels:
148
-
app: dxemssql
149
-
template:
148
+
app: dxemssql
149
+
template:
150
150
metadata:
151
-
labels:
151
+
labels:
152
152
app: dxemssql
153
153
spec:
154
-
securityContext:
154
+
securityContext:
155
155
fsGroup: 10001
156
-
containers:
157
-
- name: sql
158
-
image: mcr.microsoft.com/mssql/server:2022-latest
159
-
env:
160
-
- name: ACCEPT_EULA
161
-
value: "Y"
162
-
- name: MSSQL_ENABLE_HADR
163
-
value: "1"
164
-
- name: MSSQL_SA_PASSWORD
165
-
valueFrom:
166
-
secretKeyRef:
167
-
name: mssql
168
-
key: MSSQL_SA_PASSWORD
169
-
volumeMounts:
170
-
- name: mssql
171
-
mountPath: "/var/opt/mssql"
172
-
- name: dxe
173
-
image: dh2i/dxe
174
-
env:
175
-
- name: MSSQL_SA_PASSWORD
176
-
valueFrom:
177
-
secretKeyRef:
178
-
name: mssql
179
-
key: MSSQL_SA_PASSWORD
180
-
volumeMounts:
156
+
containers:
157
+
- name: sql
158
+
image: mcr.microsoft.com/mssql/server:2022-latest
159
+
env:
160
+
- name: ACCEPT_EULA
161
+
value: "Y"
162
+
- name: MSSQL_ENABLE_HADR
163
+
value: "1"
164
+
- name: MSSQL_SA_PASSWORD
165
+
valueFrom:
166
+
secretKeyRef:
167
+
name: mssql
168
+
key: MSSQL_SA_PASSWORD
169
+
volumeMounts:
170
+
- name: mssql
171
+
mountPath: "/var/opt/mssql"
181
172
- name: dxe
182
-
mountPath: "/etc/dh2i"
183
-
volumeClaimTemplates:
184
-
- metadata:
185
-
name: dxe
186
-
spec:
187
-
accessModes:
188
-
- ReadWriteOnce
189
-
resources:
190
-
requests:
191
-
storage: 1Gi
192
-
- metadata:
193
-
name: mssql
194
-
spec:
195
-
accessModes:
196
-
- ReadWriteOnce
197
-
resources:
198
-
requests:
199
-
storage: 1Gi
173
+
image: docker.io/dh2i/dxe
174
+
env:
175
+
- name: MSSQL_SA_PASSWORD
176
+
valueFrom:
177
+
secretKeyRef:
178
+
name: mssql
179
+
key: MSSQL_SA_PASSWORD
180
+
volumeMounts:
181
+
- name: dxe
182
+
mountPath: "/etc/dh2i"
183
+
volumeClaimTemplates:
184
+
- metadata:
185
+
name: dxe
186
+
spec:
187
+
accessModes:
188
+
- ReadWriteOnce
189
+
resources:
190
+
requests:
191
+
storage: 1Gi
192
+
- metadata:
193
+
name: mssql
194
+
spec:
195
+
accessModes:
196
+
- ReadWriteOnce
197
+
resources:
198
+
requests:
199
+
storage: 1Gi
200
200
```
201
201
202
202
1. Create a credential for the [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.md)] instance.
@@ -588,7 +588,7 @@ You should now have three [!INCLUDE [ssnoversion-md](../includes/ssnoversion-md.
588
588
589
589
## Configure the DxEnterprise cluster on the deployed containers
590
590
591
-
DxEnterprise is high availability clustering software from DH2i that supports AGs, including in containers. A fully featured [developer](https://dh2i.com/dxenterprise-dxodyssey-developer-edition) edition is available fornon-production use. To configure the DxEnterprise clusterin containers, follow the steps in this [DH2i guide](https://support.dh2i.com/docs/guides/dxenterprise/azure/ms-k8s-supplemental-guide/#configure-the-primary-and-create-the-availability-group).
591
+
DxEnterprise is high availability clustering software from DH2i that supports AGs, including in containers. A fully featured [developer](https://dh2i.com/trial) edition is available fornon-production use. To configure the DxEnterprise clusterin containers, follow the steps in this [DH2i guide](https://support.dh2i.com/docs/guides/dxenterprise/azure/ms-k8s-supplemental-guide/#configure-the-primary-and-create-the-availability-group).
592
592
593
593
With these steps, you should have an AG created and databases added to the group supporting high availability.
0 commit comments