Create Azure Arc data controller in direct connectivity mode using CLI
This article describes how to create the Azure Arc data controller in direct connectivity mode using Azure CLI.
Complete prerequisites
Before you begin, verify that you have completed the prerequisites in Deploy data controller - direct connect mode - prerequisites.
Use the Bash environment in Azure Cloud Shell. For more information, see Quickstart for Bash in Azure Cloud Shell.
If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the Azure CLI in a Docker container.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see Sign in with the Azure CLI.
When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see Use extensions with the Azure CLI.
Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
Deploy Arc data controller
Creating an Azure Arc data controller in direct connectivity mode involves the following steps:
- Create an Azure Arc-enabled data services extension.
- Create a custom location.
- Create the data controller.
Create the Arc data controller extension, custom location, and Arc data controller all in one command as follows:
## variables for Azure subscription, resource group, cluster name, location, extension, and namespace.
export resourceGroup=<Your resource group>
export clusterName=<name of your connected Kubernetes cluster>
export customLocationName=<name of your custom location>
## variables for logs and metrics dashboard credentials
export AZDATA_LOGSUI_USERNAME=<username for Kibana dashboard>
export AZDATA_LOGSUI_PASSWORD=<password for Kibana dashboard>
export AZDATA_METRICSUI_USERNAME=<username for Grafana dashboard>
export AZDATA_METRICSUI_PASSWORD=<password for Grafana dashboard>
Deploy the Azure Arc data controller using released profile
az arcdata dc create --name <name> -g ${resourceGroup} --custom-location ${customLocationName} --cluster-name ${clusterName} --connectivity-mode direct --profile-name <the-deployment-profile> --auto-upload-metrics true --auto-upload-logs true --storage-class <storageclass>
# Example
az arcdata dc create --name arc-dc1 --resource-group my-resource-group ----custom-location cl-name --connectivity-mode direct --profile-name azure-arc-aks-premium-storage --auto-upload-metrics true --auto-upload-logs true --storage-class mystorageclass
If you want to create the Azure Arc data controller using a custom configuration template, follow the steps described in Create custom configuration profile and provide the path to the file as follows:
az arcdata dc create --name -g ${resourceGroup} --custom-location ${customLocationName} --cluster-name ${clusterName} --connectivity-mode direct --path ./azure-arc-custom --auto-upload-metrics true --auto-upload-logs true
# Example
az arcdata dc create --name arc-dc1 --resource-group my-resource-group ----custom-location cl-name --connectivity-mode direct --path ./azure-arc-custom --auto-upload-metrics true --auto-upload-logs true
Monitor the status of Azure Arc data controller deployment
The deployment status of the Arc data controller on the cluster can be monitored as follows:
kubectl get datacontrollers --namespace arc