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/learn/tutorial-kubernetes-workload-identity.md
+5-43Lines changed: 5 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Tutorial - Use a workload identity with an application on Azure Kubernete
3
3
description: In this Azure Kubernetes Service (AKS) tutorial, you deploy an Azure Kubernetes Service cluster and configure an application to use a workload identity.
4
4
ms.topic: tutorial
5
5
ms.custom: devx-track-azurecli
6
-
ms.date: 04/17/2023
6
+
ms.date: 04/18/2023
7
7
---
8
8
9
9
# Tutorial: Use a workload identity with an application on Azure Kubernetes Service (AKS)
@@ -20,8 +20,6 @@ This tutorial assumes a basic understanding of Kubernetes concepts. For more inf
[!INCLUDE [preview features callout](../includes/preview/preview-callout.md)]
24
-
25
23
- This article requires version 2.40.0 or later of the Azure CLI. If using Azure Cloud Shell, the latest version is already installed.
26
24
27
25
- You have installed the latest version of the `aks-preview` extension, version 0.5.102 or later.
@@ -61,42 +59,6 @@ The following output example resembles successful creation of the resource group
61
59
}
62
60
```
63
61
64
-
## Install the aks-preview Azure CLI extension
65
-
66
-
[!INCLUDE [preview features callout](../includes/preview/preview-callout.md)]
67
-
68
-
To install the aks-preview extension, run the following command:
69
-
70
-
```azurecli-interactive
71
-
az extension add --name aks-preview
72
-
```
73
-
74
-
Run the following command to update to the latest version of the extension released:
75
-
76
-
```azurecli-interactive
77
-
az extension update --name aks-preview
78
-
```
79
-
80
-
## Register the 'EnableWorkloadIdentityPreview' feature flag
81
-
82
-
Register the `EnableWorkloadIdentityPreview` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
83
-
84
-
```azurecli-interactive
85
-
az feature register --namespace "Microsoft.ContainerService" --name "EnableWorkloadIdentityPreview"
86
-
```
87
-
88
-
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature list][az-feature-list] command:
89
-
90
-
```azurecli-interactive
91
-
az feature show --namespace "Microsoft.ContainerService" --name "EnableWorkloadIdentityPreview"
92
-
```
93
-
94
-
When the status shows *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
95
-
96
-
```azurecli-interactive
97
-
az provider register --namespace Microsoft.ContainerService
98
-
```
99
-
100
62
## Export environmental variables
101
63
102
64
To help simplify steps to configure the identities required, the steps below define
Create an AKS cluster using the [az aks create][az-aks-create] command with the `--enable-oidc-issuer` parameter to use the OIDC Issuer. The following example creates a cluster named *myAKSCluster* with one node in the *myResourceGroup*:
120
84
121
85
```azurecli-interactive
122
-
az aks create -g "${RESOURCE_GROUP}" -n myAKSCluster --node-count 1 --enable-oidc-issuer --enable-workload-identity --generate-ssh-keys
86
+
az aks create -g "${RESOURCE_GROUP}" -n myAKSCluster --node-count 1 --enable-oidc-issuer --enable-workload-identity
123
87
```
124
88
125
89
After a few minutes, the command completes and returns JSON-formatted information about the cluster.
Copy file name to clipboardExpand all lines: articles/aks/workload-identity-deploy-cluster.md
+4-40Lines changed: 4 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Deploy and configure an Azure Kubernetes Service (AKS) cluster with workl
3
3
description: In this Azure Kubernetes Service (AKS) article, you deploy an Azure Kubernetes Service cluster and configure it with an Azure AD workload identity (preview).
4
4
ms.topic: article
5
5
ms.custom: devx-track-azurecli
6
-
ms.date: 04/17/2023
6
+
ms.date: 04/18/2023
7
7
---
8
8
9
9
# Deploy and configure workload identity (preview) on an Azure Kubernetes Service (AKS) cluster
@@ -23,42 +23,6 @@ This article assumes you have a basic understanding of Kubernetes concepts. For
23
23
24
24
- If you have multiple Azure subscriptions, select the appropriate subscription ID in which the resources should be billed using the [az account][az-account] command.
25
25
26
-
## Install the aks-preview Azure CLI extension
27
-
28
-
[!INCLUDE [preview features callout](includes/preview/preview-callout.md)]
29
-
30
-
To install the aks-preview extension, run the following command:
31
-
32
-
```azurecli
33
-
az extension add --name aks-preview
34
-
```
35
-
36
-
Run the following command to update to the latest version of the extension released:
37
-
38
-
```azurecli
39
-
az extension update --name aks-preview
40
-
```
41
-
42
-
## Register the 'EnableWorkloadIdentityPreview' feature flag
43
-
44
-
Register the `EnableWorkloadIdentityPreview` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
45
-
46
-
```azurecli-interactive
47
-
az feature register --namespace "Microsoft.ContainerService" --name "EnableWorkloadIdentityPreview"
48
-
```
49
-
50
-
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature show][az-feature-show] command:
51
-
52
-
```azurecli-interactive
53
-
az feature show --namespace "Microsoft.ContainerService" --name "EnableWorkloadIdentityPreview"
54
-
```
55
-
56
-
When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
57
-
58
-
```azurecli-interactive
59
-
az provider register --namespace Microsoft.ContainerService
60
-
```
61
-
62
26
## Export environmental variables
63
27
64
28
To help simplify steps to configure the identities required, the steps below define
@@ -91,10 +55,10 @@ After a few minutes, the command completes and returns JSON-formatted informatio
91
55
> [!NOTE]
92
56
> When you create an AKS cluster, a second resource group is automatically created to store the AKS resources. For more information, see [Why are two resource groups created with AKS?][aks-two-resource-groups].
93
57
94
-
To get the OIDC Issuer URL and save it to an environmental variable, run the following command. Replace the default value for the cluster name.
58
+
To get the OIDC Issuer URL and save it to an environmental variable, run the following command. Replace the default value for the arguments `-n`, which is the name of the cluster:
95
59
96
60
```bash
97
-
export AKS_OIDC_ISSUER="$(az aks show -n myAKSCluster -g ${RESOURCE_GROUP} --query "oidcIssuerProfile.issuerUrl" -otsv)"
61
+
export AKS_OIDC_ISSUER="$(az aks show -n myAKSCluster -g "${RESOURCE_GROUP}" --query "oidcIssuerProfile.issuerUrl" -otsv)"
0 commit comments