Share via


Distribuire PostgreSQL abilitato per Azure Arc integrato con Active Directory usando l'interfaccia della riga di comando di Azure

Questo articolo illustra come distribuire il server PostgreSQL abilitato per Azure Arc con l'autenticazione di Active Directory (AD) tramite l'interfaccia della riga di comando di Azure.

Per istruzioni specifiche, vedere questi articoli:

Prerequisiti

Prima di procedere, installare gli strumenti seguenti:

Per altre informazioni dettagliate su come configurare l'unità organizzativa e l'account AD, vedere Distribuire i servizi dati abilitati per Azure Arc nell'autenticazione di Active Directory - Prerequisiti

Importante

Quando si usa Active Directory, l'account predefinito deve essere denominato "postgres" affinché le connessioni abbiano esito positivo.

Distribuire e aggiornare il server PostgreSQL abilitato per Azure Arc integrato in Active Directory

Modalità keytab gestita dal cliente

Creare un server PostgreSQL abilitato per Azure Arc

Per visualizzare le opzioni disponibili per il comando create per il server PostgreSQL abilitato per Azure Arc, usare il comando seguente:

az postgres server-arc create --help

Per creare un Istanza gestita di SQL, usare az postgres server-arc create. Vedere l'esempio seguente:

az postgres server-arc create 
--name < PostgreSQL server name >  
--k8s-namespace < namespace > 
--ad-connector-name < your AD connector name > 
--keytab-secret < PostgreSQL server keytab secret name >  
--ad-account-name < PostgreSQL server AD user account >  
--dns-name < PostgreSQL server primary endpoint DNS name > 
--port < PostgreSQL server primary endpoint port number >
--use-k8s

Esempio:

az postgres server-arc create 
--name contosopg 
--k8s-namespace arc 
--ad-connector-name adarc 
--keytab-secret arcuser-keytab-secret
--ad-account-name arcuser 
--dns-name arcpg.contoso.local
--port 31432
--use-k8s

Aggiornare un server PostgreSQL abilitato per Azure Arc

Per aggiornare un server PostgreSQL abilitato per Arc, usare az postgres server-arc update. Vedere l'esempio seguente:

az postgres server-arc update 
--name < PostgreSQL server name >  
--k8s-namespace < namespace > 
--keytab-secret < PostgreSQL server keytab secret name >  
--use-k8s

Esempio:

az postgres server-arc update 
--name contosopg 
--k8s-namespace arc 
--keytab-secret arcuser-keytab-secret
--use-k8s
  • Provalo. Iniziare rapidamente a usare Azure Arc Jumpstart in servizio Azure Kubernetes (AKS), aws Elastic Kubernetes Service (EKS), Google Cloud Kubernetes Engine (GKE) o in una macchina virtuale di Azure.