@@ -103,7 +103,7 @@ Use the `az aks create` command to create an AKS cluster. The following example
103
103
104
104
``` shell
105
105
az aks create --name < cluster> --resource-group < resourcegroup> --node-count 2 \
106
- --enable-cluster-autoscaler --min-count 2 --max-count 4
106
+ --enable-cluster-autoscaler --min-count 2 --max-count 4 --generate-ssh-keys
107
107
```
108
108
109
109
After a few minutes, the command completes and returns JSON-formatted information about the cluster. Make a note of the newly-created Resource Group that is displayed in the JSON output (e.g. "nodeResourceGroup": "<noderesourcegroup >") if you have to tag it, for example:
@@ -145,13 +145,13 @@ aks-nodepool1-27504729-vmss000001 Ready agent 21m v1.29.9
145
145
146
146
### Create an Azure Database for PostgreSQL
147
147
148
- Create an Azure Database for PostgreSQL server by running the ` az postgres server create ` command. A server can contain multiple databases.
148
+ Create an Azure Database for PostgreSQL flexible server by running the ` az postgres flexible- server create ` command. A server can contain multiple databases.
149
149
To get a good bandwidth between ODM containers and the database, choose the same location for the PostgreSQL server and for the AKS cluster.
150
150
151
151
``` shell
152
- az postgres server create --name < postgresqlserver> --resource-group < resourcegroup> \
152
+ az postgres flexible- server create --name < postgresqlserver> --resource-group < resourcegroup> \
153
153
--admin-user myadmin --admin-password ' passw0rd!' \
154
- --sku-name GP_Gen5_2 --version 11
154
+ --sku-name Standard_D2s_v3 --version 15
155
155
```
156
156
157
157
> [ !NOTE]
@@ -161,47 +161,96 @@ Verify the database.
161
161
To connect to your server, you need to provide host information and access credentials.
162
162
163
163
``` shell
164
- az postgres server show --name < postgresqlserver> --resource-group < resourcegroup>
164
+ az postgres flexible- server show --name < postgresqlserver> --resource-group < resourcegroup>
165
165
```
166
166
167
167
Result:
168
168
169
169
``` json
170
170
{
171
171
"administratorLogin" : " myadmin" ,
172
- "byokEnforcement" : " Disabled" ,
173
- "earliestRestoreDate" : " 2022-01-06T09:15:54.563000+00:00" ,
172
+ "administratorLoginPassword" : null ,
173
+ "authConfig" : {
174
+ "activeDirectoryAuth" : " Disabled" ,
175
+ "passwordAuth" : " Enabled" ,
176
+ "tenantId" : null
177
+ },
178
+ "availabilityZone" : " 2" ,
179
+ "backup" : {
180
+ "backupRetentionDays" : 7 ,
181
+ "earliestRestoreDate" : " 2024-11-21T10:10:16.007641+00:00" ,
182
+ "geoRedundantBackup" : " Disabled"
183
+ },
184
+ "cluster" : null ,
185
+ "createMode" : null ,
186
+ "dataEncryption" : {
187
+ "geoBackupEncryptionKeyStatus" : null ,
188
+ "geoBackupKeyUri" : null ,
189
+ "geoBackupUserAssignedIdentityId" : null ,
190
+ "primaryEncryptionKeyStatus" : null ,
191
+ "primaryKeyUri" : null ,
192
+ "primaryUserAssignedIdentityId" : null ,
193
+ "type" : " SystemManaged"
194
+ },
174
195
"fullyQualifiedDomainName" : " <postgresqlserver>.postgres.database.azure.com" ,
175
- "id" : " /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-5242e4507709/resourceGroups/<resourcegroup>/providers/Microsoft.DBforPostgreSQL/servers/<postgresqlserver>" ,
196
+ "highAvailability" : {
197
+ "mode" : " Disabled" ,
198
+ "standbyAvailabilityZone" : null ,
199
+ "state" : " NotEnabled"
200
+ },
201
+ "id" : " /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-cb6e4a84fda1/resourceGroups/<resourcegroup>/providers/Microsoft.DBforPostgreSQL/flexibleServers/<postgresqlserver>" ,
176
202
"identity" : null ,
177
- "infrastructureEncryption" : " Disabled" ,
178
203
"location" : " <azurelocation>" ,
179
- "masterServerId" : " " ,
180
- "minimalTlsVersion" : " TLSEnforcementDisabled" ,
204
+ "maintenanceWindow" : {
205
+ "customWindow" : " Disabled" ,
206
+ "dayOfWeek" : 0 ,
207
+ "startHour" : 0 ,
208
+ "startMinute" : 0
209
+ },
210
+ "minorVersion" : " 8" ,
181
211
"name" : " <postgresqlserver>" ,
212
+ "network" : {
213
+ "delegatedSubnetResourceId" : null ,
214
+ "privateDnsZoneArmResourceId" : null ,
215
+ "publicNetworkAccess" : " Enabled"
216
+ },
217
+ "pointInTimeUtc" : null ,
182
218
"privateEndpointConnections" : [],
183
- "publicNetworkAccess" : " Enabled" ,
219
+ "replica" : {
220
+ "capacity" : 5 ,
221
+ "promoteMode" : null ,
222
+ "promoteOption" : null ,
223
+ "replicationState" : null ,
224
+ "role" : " Primary"
225
+ },
184
226
"replicaCapacity" : 5 ,
185
- "replicationRole" : " None " ,
227
+ "replicationRole" : " Primary " ,
186
228
"resourceGroup" : " <resourcegroup>" ,
187
229
"sku" : {
188
- "capacity" : 2 ,
189
- "family" : " Gen5" ,
190
- "name" : " GP_Gen5_2" ,
191
- "size" : null ,
230
+ "name" : " Standard_D2s_v3" ,
192
231
"tier" : " GeneralPurpose"
193
232
},
194
- "sslEnforcement" : " Enabled" ,
195
- "storageProfile" : {
196
- "backupRetentionDays" : 7 ,
197
- "geoRedundantBackup" : " Disabled" ,
198
- "storageAutogrow" : " Enabled" ,
199
- "storageMb" : 51200
233
+ "sourceServerResourceId" : null ,
234
+ "state" : " Ready" ,
235
+ "storage" : {
236
+ "autoGrow" : " Disabled" ,
237
+ "iops" : 500 ,
238
+ "storageSizeGb" : 128 ,
239
+ "throughput" : null ,
240
+ "tier" : " P10" ,
241
+ "type" : " "
242
+ },
243
+ "systemData" : {
244
+ "createdAt" : " 2024-11-21T10:05:19.405443+00:00" ,
245
+ "createdBy" : null ,
246
+ "createdByType" : null ,
247
+ "lastModifiedAt" : null ,
248
+ "lastModifiedBy" : null ,
249
+ "lastModifiedByType" : null
200
250
},
201
251
"tags" : null ,
202
- "type" : " Microsoft.DBforPostgreSQL/servers" ,
203
- "userVisibleState" : " Ready" ,
204
- "version" : " 11"
252
+ "type" : " Microsoft.DBforPostgreSQL/flexibleServers" ,
253
+ "version" : " 15"
205
254
}
206
255
```
207
256
@@ -212,16 +261,16 @@ Make a note of the server name that is displayed in the JSON output (e.g. "fully
212
261
To make sure your database and your AKS cluster can communicate, put in place firewall rules with the following command:
213
262
214
263
``` shell
215
- az postgres server firewall-rule create --resource-group < resourcegroup> --server -name < postgresqlserver> \
216
- --name < rule> --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255
264
+ az postgres flexible- server firewall-rule create --resource-group < resourcegroup> --name < postgresqlserver> \
265
+ --rule- name < rule-name > --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255
217
266
```
218
267
219
268
### Create the database credentials secret for Azure PostgreSQL
220
269
221
270
To secure the access to the database, create a secret that encrypts the database user and password before you install the Helm release.
222
271
223
272
``` shell
224
- kubectl create secret generic < odmdbsecret> --from-literal=db-user=myadmin@ < postgresqlserver > \
273
+ kubectl create secret generic < odmdbsecret> --from-literal=db-user=myadmin \
225
274
--from-literal=db-password=' passw0rd!'
226
275
```
227
276
0 commit comments