Skip to content

Commit d6b3817

Browse files
authored
Merge pull request #296357 from MicrosoftDocs/main
3/14/2025 AM Publish
2 parents 0957e2b + 5277474 commit d6b3817

26 files changed

+336
-103
lines changed

articles/databox-online/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster.md

Lines changed: 68 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: alkohli
66

77
ms.service: azure-stack-edge
88
ms.topic: how-to
9-
ms.date: 02/17/2022
9+
ms.date: 03/14/2025
1010
ms.author: alkohli
1111
---
1212

@@ -16,9 +16,9 @@ ms.author: alkohli
1616

1717
This article shows you how to enable Azure Arc on an existing Kubernetes cluster on your Azure Stack Edge Pro device.
1818

19-
This procedure assumes that you have read and understood the following articles:
19+
This procedure assumes that you've read and understood the following articles:
2020

21-
- [Kubernetes workloads on Azure Stack Edge Pro device](azure-stack-edge-gpu-kubernetes-workload-management.md)
21+
- [Kubernetes workloads on Azure Stack Edge Pro device](azure-stack-edge-gpu-kubernetes-workload-management.md).
2222
- [What is Azure Arc-enabled Kubernetes (Preview)?](/azure/azure-arc/kubernetes/overview)
2323

2424
## Prerequisites
@@ -31,7 +31,7 @@ Make sure that you've completed the following prerequisites on your Azure Stack
3131
1. The device is activated. See [Activate the device](azure-stack-edge-gpu-deploy-activate.md).
3232
1. The device has the compute role configured via Azure portal and has a Kubernetes cluster. See [Configure compute](azure-stack-edge-gpu-deploy-configure-compute.md).
3333

34-
1. You've owner access to the subscription. You would need this access during the role assignment step for your service principal.
34+
1. You have owner access to the subscription. You would need this access during the role assignment step for your service principal.
3535

3636

3737
### For client accessing the device
@@ -50,7 +50,7 @@ Make sure that you've completed the following prerequisites on your Azure Stack
5050
- Use `kubectl version` to check the version of kubectl running on the client. Make a note of the full version.
5151
- In the local UI of your Azure Stack Edge Pro device, go to **Software update** and note the Kubernetes server version number.
5252

53-
![Verify Kubernetes server version number](media/azure-stack-edge-gpu-connect-powershell-interface/verify-kubernetes-version-1.png)
53+
![Screenshot of verify Kubernetes server version number.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/verify-kubernetes-version-1.png)
5454

5555
- Verify these two versions are compatible.
5656

@@ -62,27 +62,27 @@ Before you enable Azure Arc on the Kubernetes cluster, you need to enable and re
6262
1. To enable a resource provider, in the Azure portal, go to the subscription that you're planning to use for the deployment. Go to **Resource Providers**.
6363
1. In the right-pane, search for the providers you want to add. In this example, `Microsoft.Kubernetes` and `Microsoft.KubernetesConfiguration`.
6464

65-
![Register Kubernetes resource providers](media/azure-stack-edge-gpu-connect-powershell-interface/register-k8-resource-providers-1.png)
65+
![Screenshot of register Kubernetes resource providers.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/register-k8-resource-providers-1.png)
6666

6767
1. Select a resource provider and from the top of the command bar, select **Register**. Registration takes several minutes.
6868

69-
![Register Kubernetes resource providers 2](media/azure-stack-edge-gpu-connect-powershell-interface/register-k8-resource-providers-2.png)
69+
![Screenshot of register Kubernetes resource providers 2.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/register-k8-resource-providers-2.png)
7070

7171
1. Refresh the UI until you see that the resource provider is registered. Repeat the process for both resource providers.
7272

73-
![Register Kubernetes resource providers 3](media/azure-stack-edge-gpu-connect-powershell-interface/register-k8-resource-providers-4.png)
73+
![Screenshot of register Kubernetes resource providers 3.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/register-k8-resource-providers-4.png)
7474

7575
You can also register resource providers via the `az cli`. For more information, see [Register the two providers for Azure Arc-enabled Kubernetes](/azure/azure-arc/kubernetes/quickstart-connect-cluster#register-providers-for-azure-arc-enabled-kubernetes).
7676

7777
## Create service principal, assign role
7878

7979
1. Make sure that you have `Subscription ID` and the name of the resource group you used for the resource deployment for your Azure Stack Edge service. To get the subscription ID, go to your Azure Stack Edge resource in the Azure portal. Navigate to **Overview > Essentials**.
8080

81-
![Get subscription ID](media/azure-stack-edge-gpu-connect-powershell-interface/get-subscription-id-1.png)
81+
![Screenshot of get subscription ID.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/get-subscription-id-1.png)
8282

8383
To get the resource group name, go to **Properties**.
8484

85-
![Get resource group name](media/azure-stack-edge-gpu-connect-powershell-interface/get-resource-group-name-1.png)
85+
![Screenshot of get resource group name.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/get-resource-group-name-1.png)
8686

8787
1. To create a service principal, use the following command via the `az cli`.
8888

@@ -104,9 +104,39 @@ You can also register resource providers via the `az cli`. For more information,
104104
PS /home/user>
105105
```
106106
107-
1. Make a note of the `appID`, `name`, `password`, and `tenantID` as you'll use these values as input to the next command.
107+
1. Make a note of the `appId`, `name`, `password`, and `tenantID` as you'll use these values as input to the next command.
108108
109-
1. After creating the new service principal, assign the `Kubernetes Cluster - Azure Arc Onboarding` role to the newly created principal. This is a built-in Azure role (use the role ID in the command) with limited permissions. Use the following command:
109+
There are several ways to obtain `appId`. The following three options are the preferred methods. If you use one of the following options, you can skip steps 1, 2, and 3 from the previous section and move directly to the following step 4.
110+
111+
- Option 1 - Use Minishell to run the following PowerShell cmdlet:
112+
113+
```powershell
114+
[Device-IP]: PS> Get-AzureDataBoxEdgeApplicationId
115+
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
116+
[Device-IP]: PS>
117+
```
118+
119+
- Option 2 - Use the following steps to view JSON details for your device In Azure portal:
120+
121+
1. Navigate to your Azure Stack Edge device **Overview** and then select **JSON view** at top right.
122+
123+
![Screenshot of view Overview page for your Azure Stack Edge device.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/view-device-overview.png)
124+
125+
1. In the **Resource JSON** details for your device, make note of the `principalId`.
126+
127+
![Screenshot of view JSON details for your Azure Stack Edge device.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/view-json-details.png)
128+
129+
- Option 3 - Use non-Azure Stack Edge PowerShell on a client machine to run the following command:
130+
131+
```powershell
132+
// ASE resource group and resource name can be obtained from Azure portal
133+
PS C:\> $ASEResource= GetAzResource –ResourceGroupName <resource-group-name> -ResourceName <resource-name>
134+
PS C:\> $ASEResource.Identity.PrincipalId
135+
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
136+
PS C:\>
137+
```
138+
139+
1. After you create the new service principal, or after you retrieve it using one of these options, assign the `Kubernetes Cluster - Azure Arc Onboarding` role to the newly created principal. This is a built-in Azure role (use the role ID in the command) with limited permissions. Use the following command:
110140
111141
`az role assignment create --role 34e09817-6cbe-4d01-b1a2-e0eac5743d41 --assignee <appId-from-service-principal> --scope /subscriptions/<SubscriptionID>/resourceGroups/<Resource-group-name>`
112142
@@ -128,45 +158,47 @@ You can also register resource providers via the `az cli`. For more information,
128158
PS /home/user>
129159
```
130160
131-
132161
## Enable Arc on Kubernetes cluster
133162
134163
Follow these steps to configure the Kubernetes cluster for Azure Arc management:
135164
136165
1. [Connect to the PowerShell interface](azure-stack-edge-gpu-connect-powershell-interface.md#connect-to-the-powershell-interface) of your device.
137166
138-
1. Type:
167+
1. Run the following command:
139168
140169
`Set-HcsKubernetesAzureArcAgent -SubscriptionId "<Your Azure Subscription Id>" -ResourceGroupName "<Resource Group Name>" -ResourceName "<Azure Arc resource name (shouldn't exist already)>" -Location "<Region associated with resource group>" -TenantId "<Tenant Id of service principal>" -ClientId "<App id of service principal>"`
141170
142-
When this command is run, there's a follow-up prompt to enter the `ClientSecret`. Provide the service principal password.
171+
After you run this command, you see a follow-up prompt to specify `ClientSecret`. Provide the service principal password at the prompt.
143172
144173
Add the `CloudEnvironment` parameter if you're using a cloud other than Azure public. You can set this parameter to `AZUREPUBLICCLOUD`, `AZURECHINACLOUD`, `AZUREGERMANCLOUD`, and `AZUREUSGOVERNMENTCLOUD`.
145174
146-
> [!NOTE]
147-
> - To deploy Azure Arc on your device, make sure that you are using a [Supported region for Azure Arc](https://azure.microsoft.com/global-infrastructure/services/?products=azure-arc).
148-
> - Use the `az account list-locations` command to figure out the exact location name to pass in the `Set-HcsKubernetesAzureArcAgent` cmdlet. Location names are typically formatted without any spaces.
149-
> - `ClientId` and `ClientSecret` are required.
175+
**Usage considerations:**
150176
151-
Here's an example:
177+
- To deploy Azure Arc on your device, make sure that you're using a [Supported region for Azure Arc](https://azure.microsoft.com/global-infrastructure/services/?products=azure-arc).
178+
- Use the `az account list-locations` command to determine the exact location name to pass in the `Set-HcsKubernetesAzureArcAgent` cmdlet. Location names are typically formatted without any spaces.
179+
180+
> [!IMPORTANT]
181+
> If you obtain the `Id` instead of creating a new service principle using the older method, then do not specify `ClientId`, `TenantId`, or `ClientSecret`.
152182
153-
```powershell
154-
[10.100.10.10]: PS>Set-HcsKubernetesAzureArcAgent -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "myaserg1" -ResourceName "myasetestresarc" -Location "westeurope" -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
183+
Here's an example:
155184
156-
WARNING: A script or application on the remote computer 10.126.76.0 is sending a prompt request. When you are prompted,
157-
enter sensitive information, such as credentials or passwords, only if you trust the remote computer and the
158-
application or script that is requesting the data.
185+
```powershell
186+
[10.100.10.10]: PS>Set-HcsKubernetesAzureArcAgent -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "myaserg1" -ResourceName "myasetestresarc" -Location "westeurope" -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ClientId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
159187
160-
cmdlet Set-HcsKubernetesAzureArcAgent at command pipeline position 1
188+
WARNING: A script or application on the remote computer 10.126.76.0 is sending a prompt request. When you are prompted,
189+
enter sensitive information, such as credentials or passwords, only if you trust the remote computer and the
190+
application or script that is requesting the data.
161191
162-
Supply values for the following parameters:
163-
ClientSecret: **********************************
164-
[10.100.10.10]: PS>
165-
```
192+
cmdlet Set-HcsKubernetesAzureArcAgent at command pipeline position 1
193+
194+
Supply values for the following parameters:
195+
ClientSecret: **********************************
196+
[10.100.10.10]: PS>
197+
```
166198

167-
In the Azure portal, a resource should be created with the name you provided in the preceding command.
199+
In the Azure portal, a resource should be created with the name you provided in the preceding command.
168200

169-
![Go to Azure Arc resource](media/azure-stack-edge-gpu-connect-powershell-interface/verify-azure-arc-enabled-1.png)
201+
![Screenshot of go to Azure Arc resource.](media/azure-stack-edge-gpu-deploy-arc-kubernetes-cluster/verify-azure-arc-enabled-1.png)
170202

171203
1. To verify that Azure Arc is enabled successfully, run the following command from PowerShell interface:
172204

@@ -208,16 +240,16 @@ A conceptual overview of these agents is available [here](/azure/azure-arc/kuber
208240
209241
To remove the Azure Arc management, follow these steps:
210242
211-
1. 1. [Connect to the PowerShell interface](azure-stack-edge-gpu-connect-powershell-interface.md#connect-to-the-powershell-interface) of your device.
212-
2. Type:
243+
1. [Connect to the PowerShell interface](azure-stack-edge-gpu-connect-powershell-interface.md#connect-to-the-powershell-interface) of your device.
244+
2. Run the following command:
213245
214246
`Remove-HcsKubernetesAzureArcAgent`
215247
216248
217249
> [!NOTE]
218-
> By default, when resource `yamls` are deleted from the Git repository, the corresponding resources are not deleted from the Kubernetes cluster. You need to set `--sync-garbage-collection` in Arc OperatorParams to allow the deletion of resources when deleted from git repository. For more information, see [Delete a configuration](/azure/azure-arc/kubernetes/tutorial-use-gitops-connected-cluster#additional-parameters)
250+
> By default, when resource `yamls` are deleted from the Git repository, the corresponding resources aren't deleted from the Kubernetes cluster. You need to set `--sync-garbage-collection` in Arc OperatorParams to allow the deletion of resources when deleted from git repository. For more information, see [Delete a configuration](/azure/azure-arc/kubernetes/tutorial-use-gitops-connected-cluster#additional-parameters)
219251
220252
## Next steps
221253
222254
To understand how to run an Azure Arc deployment, see
223-
[Deploy a stateless PHP `Guestbook` application with Redis via GitOps on an Azure Stack Edge Pro device](azure-stack-edge-gpu-deploy-stateless-application-git-ops-guestbook.md)
255+
[Deploy a stateless PHP `Guestbook` application with Redis via GitOps on an Azure Stack Edge Pro device](azure-stack-edge-gpu-deploy-stateless-application-git-ops-guestbook.md).
1.77 KB
Loading
163 KB
Loading
81.3 KB
Loading
120 KB
Loading
123 KB
Loading
Loading
Loading
Loading
73.9 KB
Loading

0 commit comments

Comments
 (0)