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: AKS-Arc/azure-rbac-local.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ ms.custom: devx-track-azurecli
6
6
author: sethmanheim
7
7
ms.author: sethm
8
8
ms.reviewer: leslielin
9
-
ms.date: 02/21/2025
10
-
ms.lastreviewed: 02/21/2025
9
+
ms.date: 05/21/2025
10
+
ms.lastreviewed: 05/21/2025
11
11
12
12
# Intent: As an IT Pro, I want to use Azure RBAC to authenticate connections to my AKS clusters over the Internet or on a private network.
13
13
# Keyword: Kubernetes role-based access control AKS Azure RBAC AD
@@ -31,7 +31,7 @@ For a conceptual overview, see [Azure RBAC for Kubernetes Authorization](concept
31
31
Before you begin, make sure you have the following prerequisites:
32
32
33
33
- AKS on Azure Local currently supports enabling Azure RBAC only during Kubernetes cluster creation. You can't enable Azure RBAC after the Kubernetes cluster is created.
34
-
-Install the latest version of the **aksarc** and **connectedk8s** Azure CLI extensions. Note that you need to run the **aksarc** extension version 1.1.1 or later to enable Azure RBAC. Run `az --version` to find the current version. If you need to install or upgrade Azure CLI, see [Install Azure CLI](/cli/azure/install-azure-cli).
34
+
-You can enable Azure RBAC using either Azure CLI or the Azure portal. To use Azure CLI, you must install the latest versions of the **aksarc** and **connectedk8s** Azure CLI extensions. Note that you need the **aksarc** extension version 1.1.1 or later to enable Azure RBAC. Run `az --version` to find the current version. If you need to install or upgrade Azure CLI, see [Install Azure CLI](/cli/azure/install-azure-cli).
35
35
36
36
```azurecli
37
37
az extension add --name aksarc
@@ -67,18 +67,30 @@ Before you begin, make sure you have the following prerequisites:
67
67
68
68
You can create an Azure RBAC-enabled Kubernetes cluster for authorization and a Microsoft Entra ID for authentication.
You can use the [`az role assignment create`](/cli/azure/role/assignment#az-role-assignment-create) command to create role assignments.
81
91
92
+
### [Azure CLI](#tab/azurecli)
93
+
82
94
First, get the `$ARM-ID` for the target cluster to which you want to assign a role.
83
95
84
96
```azurecli
@@ -95,6 +107,13 @@ az role assignment create --role "Azure Arc Kubernetes Viewer" --assignee <assig
95
107
96
108
In this example, the scope is the Azure Resource Manager ID of the cluster. It can also be the resource group containing the Kubernetes cluster.
97
109
110
+
### [Azure portal](#tab/azureportal)
111
+
112
+
1. Go to **Azure Arc | Kubernetes clusters** and locate your Azure RBAC-enabled cluster for which you want to assign roles.
113
+
1. Navigate to **Access control (IAM)**, select the **Add** icon, and then select **Add role assignment**. If the **Add role assignment** option is disabled, verify that Azure RBAC is enabled by checking **Settings > Properties > AAD profile > Enable Azure RBAC**.
114
+
1. Follow the instructions to complete the role assignment.
115
+
---
116
+
98
117
### Create custom role definitions
99
118
100
119
You can choose to create your own role definition for use in role assignments.
0 commit comments