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: articles/aks/trusted-access-feature.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Give Azure resources access to Azure Kubernetes Service clusters by using Trusted Access (preview)
2
+
title: Get secure resource access to AKS by using Trusted Access
3
3
description: Learn how to use the Trusted Access feature to give Azure resources access to Azure Kubernetes Service (AKS) clusters.
4
4
author: schaffererin
5
5
ms.topic: article
@@ -8,26 +8,26 @@ ms.date: 12/04/2023
8
8
ms.author: schaffererin
9
9
---
10
10
11
-
# Give Azure resources access to Azure Kubernetes Service clusters by using Trusted Access (preview)
11
+
# Get secure access for Azure resources in Azure Kubernetes Service by using Trusted Access (preview)
12
12
13
13
Many Azure services that integrate with Azure Kubernetes Service (AKS) need access to the Kubernetes API server. To avoid granting these services admin access or making your AKS clusters public for network access, you can use the AKS Trusted Access feature.
14
14
15
-
This feature gives services secure access to AKS and Kubernetes via the Azure back end without requiring a private endpoint. Instead of relying on identities that have [Microsoft Entra ID](../active-directory/fundamentals/active-directory-whatis.md) permissions, this feature can use your system-assigned managed identity to authenticate with the managed services and applications that you want to use on top of AKS.
15
+
This feature gives services secure access to AKS and Kubernetes via the Azure back end without requiring a private endpoint. Instead of relying on identities that have [Microsoft Entra](../active-directory/fundamentals/active-directory-whatis.md) permissions, this feature can use your system-assigned managed identity to authenticate with the managed services and applications that you want to use with your AKS clusters.
16
16
17
-
This article shows you how to enable secure access from your Azure services to your Kubernetes API server in AKS by using Trusted Access.
17
+
This article shows you how to get secure access for your Azure services to your Kubernetes API server in AKS by using Trusted Access.
18
18
19
19
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
20
20
21
21
> [!NOTE]
22
-
> The Trusted Access API is generally available. We provide general availability (GA) support for the Azure CLI, but it's still in preview and requires the aks-preview extension.
22
+
> The Trusted Access API is generally available. We provide general availability (GA) support for the Azure CLI, but it's still in preview and requires using the aks-preview extension.
23
23
24
24
## Trusted Access feature overview
25
25
26
26
Trusted Access addresses the following scenarios:
27
27
28
-
*Azure services might not be able to access the Kubernetes API server if an authorized IP range is set or in a private cluster unless you implement a private endpoint access model.
28
+
*If an authorized IP range is set or in a private cluster, Azure services might not be able to access the Kubernetes API server unless you implement a private endpoint access model.
29
29
30
-
*Providing admin access to the Kubernetes API to an Azure service doesn't follow the least privilege access best practice and can lead to privilege escalations or risk of credentials leakage. For example, you might have to implement high-privileged service-to-service permissions, and they aren't ideal in an audit review.
30
+
*Giving an Azure service admin access to the Kubernetes API doesn't follow the least privilege access best practice and can lead to privilege escalations or risk of credentials leakage. For example, you might have to implement high-privileged service-to-service permissions, and they aren't ideal in an audit review.
31
31
32
32
You can use Trusted Access to give explicit consent to your system-assigned managed identity of allowed resources to access your AKS clusters by using an Azure resource called a *role binding*. Your Azure resources access AKS clusters through the AKS regional gateway via system-assigned managed identity authentication. The appropriate Kubernetes permissions are assigned via an Azure resource called a *role*. Through Trusted Access, you can access AKS clusters with different configurations including but not limited to [private clusters](private-clusters.md), [clusters that have local accounts turned off](manage-local-accounts-managed-azure-ad.md#disable-local-accounts), [Microsoft Entra clusters](azure-ad-integration-cli.md), and [authorized IP range clusters](api-server-authorized-ip-ranges.md).
33
33
@@ -37,10 +37,12 @@ You can use Trusted Access to give explicit consent to your system-assigned mana
37
37
* Resource types that support [system-assigned managed identity](../active-directory/managed-identities-azure-resources/overview.md).
38
38
* If you're using the Azure CLI, the aks-preview extension version 0.5.74 or later is required.
39
39
* To learn what roles to use in different scenarios, see these articles:
40
-
*[Azure Machine Learning access to AKS clusters with special configurations](https://github.com/Azure/AML-Kubernetes/blob/master/docs/azureml-aks-ta-support.md).
40
+
*[Azure Machine Learning access to AKS clusters with special configurations](https://github.com/Azure/AML-Kubernetes/blob/master/docs/azureml-aks-ta-support.md)
41
41
*[What is Azure Kubernetes Service backup?][aks-azure-backup]
42
42
*[Turn on an agentless container posture](../defender-for-cloud/concept-agentless-containers.md)
43
43
44
+
## Get started
45
+
44
46
First, install the aks-preview extension:
45
47
46
48
```azurecli
@@ -79,16 +81,16 @@ In the same subscription as the Azure resource that you want to access the clust
79
81
80
82
## Select the required Trusted Access roles
81
83
82
-
The roles that you select depend on the different Azure services. These services help create roles and role bindings that build the connection from the Azure service to AKS.
84
+
The roles that you select depend on the Azure services that you want to access the AKS cluster. Azure services help create roles and role bindings that build the connection from the Azure service to AKS.
83
85
84
86
## Create a Trusted Access role binding
85
87
86
-
After you confirm which role to use, use the Azure CLI to create a Trusted Access role binding in an AKS cluster. The role binding associates your selected role with the Azure service.
88
+
After you confirm which role to use, use the Azure CLI to create a Trusted Access role binding in the AKS cluster. The role binding associates your selected role with the Azure service.
87
89
88
90
```azurecli
89
91
# Create a Trusted Access role binding in an AKS cluster
90
92
91
-
az aks trustedaccess rolebinding create --resource-group <AKS resource group> --cluster-name <AKS cluster name> -n <rolebinding name> -s <connected service resource ID> --roles <roleName1, roleName2>
93
+
az aks trustedaccess rolebinding create --resource-group <AKS resource group> --cluster-name <AKS cluster name> -n <role binding name> -s <connected service resource ID> --roles <roleName1, roleName2>
92
94
93
95
# Sample command
94
96
@@ -99,19 +101,19 @@ az aks trustedaccess rolebinding create \
## Update an existing Trusted Access role binding with new roles
104
+
## Update an existing Trusted Access role binding
103
105
104
106
For an existing role binding that has an associated source service, you can update the role binding with new roles.
105
107
106
108
> [!NOTE]
107
109
> The new role binding might take up to 5 minutes to take effect. The add-on manager updates clusters every 5 minutes. Before the new role binding takes effect, the existing role binding still works.
108
110
>
109
-
> You can use `az aks trusted access rolebinding list --name <rolebinding name> --resource-group <resource group>` to check the current role binding.
111
+
> You can use `az aks trusted access rolebinding list --name <role binding name> --resource-group <resource group>` to check the current role binding.
110
112
111
113
```azurecli
112
114
# Update the RoleBinding command
113
115
114
-
az aks trustedaccess rolebinding update --resource-group <AKS resource group> --cluster-name <AKS cluster name> -n <existing rolebinding name> --roles <newRoleName1, newRoleName2>
116
+
az aks trustedaccess rolebinding update --resource-group <AKS resource group> --cluster-name <AKS cluster name> -n <existing role binding name> --roles <newRoleName1, newRoleName2>
115
117
116
118
# Update the RoleBinding command with sample resource group, cluster, and roles
117
119
@@ -126,7 +128,7 @@ az aks trustedaccess rolebinding update \
126
128
Use the Azure CLI to show a specific Trusted Access role binding:
127
129
128
130
```azurecli
129
-
az aks trustedaccess rolebinding show --name <rolebinding name> --resource-group <AKS resource group> --cluster-name <AKS cluster name>
131
+
az aks trustedaccess rolebinding show --name <role binding name> --resource-group <AKS resource group> --cluster-name <AKS cluster name>
130
132
```
131
133
132
134
## List all the Trusted Access role bindings for a cluster
@@ -140,18 +142,18 @@ az aks trustedaccess rolebinding list --resource-group <AKS resource group> --cl
140
142
## Delete a Trusted Access role binding for a cluster
141
143
142
144
> [!WARNING]
143
-
> Deleting an existing Trusted Access role binding disconnects the AKS cluster from the Azure service.
145
+
> Deleting an existing Trusted Access role binding disconnects the Azure service from the AKS cluster.
144
146
145
147
Use the Azure CLI to delete an existing Trusted Access role binding:
146
148
147
149
```azurecli
148
-
az aks trustedaccess rolebinding delete --name <rolebinding name> --resource-group <AKS resource group> --cluster-name <AKS cluster name>
150
+
az aks trustedaccess rolebinding delete --name <role binding name> --resource-group <AKS resource group> --cluster-name <AKS cluster name>
149
151
```
150
152
151
153
## Related content
152
154
153
155
*[Deploy and manage cluster extensions for AKS](cluster-extensions.md)
154
-
*[Deploy the Azure Machine Learning extension on an AKS or Arc Kubernetes cluster](../machine-learning/how-to-deploy-kubernetes-extension.md)
156
+
*[Deploy the Azure Machine Learning extension on an AKS or Azure Arc–enabled Kubernetes cluster](../machine-learning/how-to-deploy-kubernetes-extension.md)
155
157
*[Deploy Azure Backup on an AKS cluster](../backup/azure-kubernetes-service-backup-overview.md)
156
158
*[Set agentless container posture in Microsoft Defender for Cloud for an AKS cluster](../defender-for-cloud/concept-agentless-containers.md)
0 commit comments