List the Azure Arc-enabled PostgreSQL servers created in an Azure Arc Data Controller

This article explains how you can retrieve the list of servers created in your Arc Data Controller.

To retrieve this list, use either of the following methods once you are connected to the Arc Data Controller:

Note

As a preview feature, the technology presented in this article is subject to Supplemental Terms of Use for Microsoft Azure Previews.

The latest updates are available in the release notes.

From CLI with Azure CLI extension (az)

The general format of the command is:

az postgres server-arc list --k8s-namespace <namespace> --use-k8s

It will return an output like:

[
  {
    "name": "postgres01",
    "state": "Ready"
  }
]

For more details about the parameters available for this command, run:

az postgres server-arc list --help

From CLI with kubectl

Run either of the following commands.

To list the server groups irrespective of the version of Postgres, run:

kubectl get postgresqls -n <namespace>

It will return an output like:

NAME         STATE   READY-PODS   PRIMARY-ENDPOINT     AGE
postgres01   Ready   5/5          12.345.67.890:5432   12d