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
Copy file name to clipboardExpand all lines: articles/aks/create-postgresql-ha.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -410,7 +410,7 @@ To validate deployment of the PostgreSQL cluster and use client PostgreSQL tooli
410
410
--output table
411
411
```
412
412
413
-
1. Get the newly created public IP address using the [`az network public-ip show`][az-network-public-ip-show] command.
413
+
3. Get the newly created public IP address using the [`az network public-ip show`][az-network-public-ip-show] command.
414
414
415
415
```azurecli-interactive
416
416
export AKS_PRIMARY_CLUSTER_PUBLICIP_ADDRESS=$(az network public-ip show \
@@ -422,7 +422,7 @@ To validate deployment of the PostgreSQL cluster and use client PostgreSQL tooli
422
422
echo $AKS_PRIMARY_CLUSTER_PUBLICIP_ADDRESS
423
423
```
424
424
425
-
2. Get the resource ID of the node resource group using the [`az group show`][az-group-show] command.
425
+
4. Get the resource ID of the node resource group using the [`az group show`][az-group-show] command.
426
426
427
427
```azurecli-interactive
428
428
export AKS_PRIMARY_CLUSTER_NODERG_NAME_SCOPE=$(az group show --name \
@@ -433,7 +433,7 @@ To validate deployment of the PostgreSQL cluster and use client PostgreSQL tooli
433
433
echo $AKS_PRIMARY_CLUSTER_NODERG_NAME_SCOPE
434
434
```
435
435
436
-
3. Assign the "Network Contributor" role to the UAMI object ID using the node resource group scope using the [`az role assignment create`][az-role-assignment-create] command.
436
+
5. Assign the "Network Contributor" role to the UAMI object ID using the node resource group scope using the [`az role assignment create`][az-role-assignment-create] command.
437
437
438
438
```azurecli-interactive
439
439
az role assignment create \
@@ -491,6 +491,7 @@ In this section, you install the CNPG operator in the AKS cluster using Helm or
Copy file name to clipboardExpand all lines: articles/aks/deploy-postgresql-ha.md
+36-29Lines changed: 36 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,6 @@ In this article, you deploy a highly available PostgreSQL database on AKS.
14
14
15
15
* If you haven't already created the required infrastructure for this deployment, follow the steps in [Create infrastructure for deploying a highly available PostgreSQL database on AKS][create-infrastructure] to get set up, and then you can return to this article.
16
16
17
-
18
17
## Create secret for bootstrap app user
19
18
20
19
1. Generate a secret to validate the PostgreSQL deployment by interactive login for a bootstrap app user using the [`kubectl create secret`][kubectl-create-secret] command.
@@ -141,39 +140,39 @@ The following table outlines the key properties set in the YAML deployment manif
@@ -233,6 +232,7 @@ The following table outlines the key properties set in the YAML deployment manif
233
232
```
234
233
235
234
Example output
235
+
236
236
```output
237
237
NAME READY STATUS RESTARTS AGE
238
238
pg-primary-cnpg-r8c7unrw-1 1/1 Running 0 4m25s
@@ -242,7 +242,7 @@ The following table outlines the key properties set in the YAML deployment manif
242
242
243
243
### Validate the Prometheus PodMonitor is running
244
244
245
-
The CNPG operator automatically creates a PodMonitor for the primary instance using the recording rules created during the [Prometheus Community installation](#install-the-cnpg-operator).
245
+
The CNPG operator automatically creates a PodMonitor for the primary instance using the recording rules created during the [Prometheus Community installation](#install-the-cnpg-operator).
246
246
247
247
* Validate the PodMonitor is running using the [`kubectl get`][kubectl-get] command.
248
248
@@ -255,6 +255,7 @@ The CNPG operator automatically creates a PodMonitor for the primary instance us
255
255
```
256
256
257
257
Example output
258
+
258
259
```output
259
260
kind: PodMonitor
260
261
metadata:
@@ -301,14 +302,14 @@ Once you have deployed the Postgres cluster and the pod monitor, you can view th
Alternatively, Once you have deployed the Postgres cluster and pod monitors, you can create a metrics dashboard on the Managed Grafana instance created by the deployment script to visualize the metrics exported to the Azure Monitor workspace. You can access the Managed Grafana via the Azure portal. Navigate to the Managed Grafana instance created by the deployment script and click on the Endpoint link as shown here:
Clicking on the Endpoint link will cause a new browser window to open where you can create dashboards on the Managed Grafana instance. Following the instructions to [configure an Azure Monitor data source](https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/grafana-plugin#configure-an-azure-monitor-data-source-plug-in), you can then add visualizations to create a dashboard of metrics from the Postgres cluster. After setting up the data source connection, from the main menu, click the Data sources option and you should see a set of data source options for the data source connection as shown here:
On the Managed Prometheus option, click the option to build a dashboard to open the dashboard editor. Once the
311
-
editor window opens, click the Add visualization option then click the Managed Prometheus option to browse the metrics from the Postgres cluster. Once you have selected the metric you want to visualize, click the Run queries button to fetch the data for the visualization as shown here:
312
+
On the Managed Prometheus option, click the option to build a dashboard to open the dashboard editor. Once the editor window opens, click the Add visualization option then click the Managed Prometheus option to browse the metrics from the Postgres cluster. Once you have selected the metric you want to visualize, click the Run queries button to fetch the data for the visualization as shown here:
Click the Save button to add the panel to your dashboard. You can add other panels by clicking the Add button in the dashboard editor and repeating this process to visualize other metrics. Adding the metrics visualizations, you should have something that looks like this:
@@ -332,23 +333,23 @@ Your output should resemble the following example output with the availability z
332
333
```output
333
334
{
334
335
"node": "aks-postgres-15810965-vmss000000",
335
-
"zone": "eastus-1"
336
+
"zone": "westus3-1"
336
337
}
337
338
{
338
339
"node": "aks-postgres-15810965-vmss000001",
339
-
"zone": "eastus-2"
340
+
"zone": "westus3-2"
340
341
}
341
342
{
342
343
"node": "aks-postgres-15810965-vmss000002",
343
-
"zone": "eastus-3"
344
+
"zone": "westus3-3"
344
345
}
345
346
{
346
347
"node": "aks-systempool-26112968-vmss000000",
347
-
"zone": "eastus-1"
348
+
"zone": "westus3-1"
348
349
}
349
350
{
350
351
"node": "aks-systempool-26112968-vmss000001",
351
-
"zone": "eastus-2"
352
+
"zone": "westus3-2"
352
353
}
353
354
```
354
355
@@ -375,7 +376,6 @@ In this section, you create a table and insert some data into the app database t
375
376
376
377
## Connect to PostgreSQL read-only replicas
377
378
378
-
379
379
* Connect to the PostgreSQL read-only replicas and validate the sample dataset using the following commands:
380
380
381
381
```azurecli-interactive
@@ -407,7 +407,8 @@ In this section, you create a table and insert some data into the app database t
407
407
```
408
408
409
409
Example output
410
-
```output
410
+
411
+
```output
411
412
Continuous Backup status
412
413
First Point of Recoverability: Not Available
413
414
Working WAL archiving: FAILING
@@ -439,6 +440,7 @@ In this section, you create a table and insert some data into the app database t
439
440
```
440
441
441
442
Example output
443
+
442
444
```output
443
445
Type Reason Age From Message
444
446
---- ------ ---- ---- -------
@@ -454,6 +456,7 @@ In this section, you create a table and insert some data into the app database t
454
456
```
455
457
456
458
Example output
459
+
457
460
```output
458
461
Continuous Backup status
459
462
First Point of Recoverability: 2024-06-05T13:47:18Z
@@ -579,7 +582,7 @@ You also create a second federated credential to map the new recovery cluster se
579
582
storage: 2Gi
580
583
storageClassName: managed-csi-premium
581
584
volumeMode: Filesystem
582
-
585
+
583
586
serviceAccountTemplate:
584
587
metadata:
585
588
annotations:
@@ -646,6 +649,7 @@ You also retrieve the following endpoints from the Cluster IP service:
@@ -856,7 +863,7 @@ In this section, you trigger a sudden failure by deleting the pod running the pr
856
863
857
864
* Once you're finished reviewing your deployment, delete all the resources you created in this guide using the [`az group delete`][az-group-delete] command.
858
865
859
-
```azurecli-interactive
866
+
```azurecli-interactive
860
867
az group delete --resource-group $RESOURCE_GROUP_NAME --no-wait --yes
0 commit comments