Skip to content

Commit 6ee7d98

Browse files
authored
Merge pull request #217084 from MGoedtel/task28382
updated and renamed migrate WI article
2 parents ebfb941 + 9dd9680 commit 6ee7d98

File tree

5 files changed

+54
-16
lines changed

5 files changed

+54
-16
lines changed

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@
130130
"redirect_url": "/azure/aks/monitor-aks",
131131
"redirect_document_id": false
132132
},
133+
{
134+
"source_path_from_root": "/articles/aks/workload-identity-migration-sidecar.md",
135+
"redirect_url": "/azure/aks/workload-identity-migrate-from-pod-identity",
136+
"redirect_document_id": false
137+
},
133138
{
134139
"source_path": "articles/api-management/zone-redundancy.md",
135140
"redirect_url": "/azure/availability-zones/migrate-api-mgt",

articles/aks/TOC.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@
334334
href: workload-identity-overview.md
335335
- name: Deploy and configure cluster
336336
href: workload-identity-deploy-cluster.md
337-
- name: Modernize your app with workload identity sidecar
338-
href: workload-identity-migration-sidecar.md
337+
- name: Modernize your app with workload identity
338+
href: workload-identity-migrate-from-pod-identity.md
339339
- name: Use Azure AD pod identity (preview)
340340
href: use-azure-ad-pod-identity.md
341341
- name: Secure pod traffic with network policies

articles/aks/workload-identity-deploy-cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,5 +175,5 @@ In this article, you deployed a Kubernetes cluster and configured it to use a wo
175175
[az-identity-create]: /cli/azure/identity#az-identity-create
176176
[az-aks-get-credentials]: /cli/azure/aks#az-aks-get-credentials
177177
[az-identity-federated-credential-create]: /cli/azure/identity/federated-credential#az-identity-federated-credential-create
178-
[workload-identity-migration]: workload-identity-migration-sidecar.md
178+
[workload-identity-migration]: workload-identity-migrate-from-pod-identity.md
179179
[azure-identity-libraries]: ../active-directory/develop/reference-v2-libraries.md

articles/aks/workload-identity-migration-sidecar.md renamed to articles/aks/workload-identity-migrate-from-pod-identity.md

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,52 @@
11
---
2-
title: Modernize your Azure Kubernetes Service (AKS) application with a workload identity sidecar
3-
description: In this Azure Kubernetes Service (AKS) article, you learn how to configure your Azure Kubernetes Service pod to authenticate with the workload identity sidecar.
2+
title: Modernize your Azure Kubernetes Service (AKS) application to use workload identity
3+
description: In this Azure Kubernetes Service (AKS) article, you learn how to configure your Azure Kubernetes Service pod to authenticate with workload identity.
44
services: container-service
55
ms.topic: article
6-
ms.date: 09/29/2022
6+
ms.date: 11/3/2022
77
---
88

9-
# Modernize application authentication with workload identity sidecar
9+
# Modernize application authentication with workload identity
1010

11-
If your Kubernetes application runs on Azure Kubernetes Service (AKS) and is using a managed identity to securely access resources in Azure, you can set up a migration sidecar ensuring a smooth transition using the new Azure Identity SDK and minimize downtime. This sidecar intercepts Instance Metadata Service (IMDS) traffic and routes them to Azure Active Directory (Azure AD) using OpenID Connect (OIDC). This enables you to migrate from using managed identity with pod identity to workload identity, until you can migrate your applications to use the latest version of Azure Identity SDK.
12-
13-
This article shows you how to set up your application pod to authenticate using managed identity with workload identity as a short-term migration solution.
11+
This article focuses on pod-managed identity migration to Azure Active Directory (Azure AD) workload identity (preview) for your Azure Kubernetes Service (AKS) cluster. It also provides guidance depending on the version of the [Azure Identity][azure-identity-supported-versions] client library used by your container-based application.
1412

1513
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
1614

1715
## Before you begin
1816

1917
- The Azure CLI version 2.40.0 or later. Run `az --version` to find the version, and run `az upgrade` to upgrade the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
2018

19+
## Migration scenarios
20+
21+
This section explains the migration options available depending on what version of the Azure Identity SDK is installed.
22+
23+
For either scenario, you need to have the federated trust set up before you update your application to use the workload identity. The following are the minimum steps required:
24+
25+
- [Create a managed identity](#create-a-managed-identity) credential.
26+
- Associate the managed identity with the kubernetes service account already used for the pod-manged identity or [create a new Kubernetes service account](#create-kubernetes-service-account) and then associate it with the managed identity.
27+
- [Establish a federated trust relationship](#establish-federated-identity-credential-trust) between the managed identity and Azure AD.
28+
29+
### Migrate from latest version
30+
31+
If your cluster is already using the latest version of the Azure Identity SDK, perform the following steps to complete the authentication configuration:
32+
33+
- Deploy workload identity in parallel to where the trust is setup. You can restart your application deployment to begin using the workload identity, where it injects the OIDC annotations into the application automatically.
34+
- After verifying the application is able to authenticate successfully, you can [remove the pod-managed identity](#remove-pod-managed-identity) annotations from your application and then remove the pod-managed identity add-on.
35+
36+
## Migrate from older version
37+
38+
If your cluster isn't using the latest version of the Azure Identity SDK, you have two options:
39+
40+
- You can use a migration sidecar that we provide, which converts the IMDS transactions your application makes over to [OpenID Connect][openid-connect-overview] (OIDC). The migration sidecar isn't intended to be a long-term solution, but a way to get up and running quickly on workload identity. Running the migration sidecar within your application proxies the application IMDS transactions over to OIDC. Perform the following steps to:
41+
42+
- [Deploy the workload with migration sidecar](#deploy-the-workload-with-migration-sidecar) to proxy the application IMDS transactions.
43+
- Once you verify the authentication transactions are completing successfully, you can [remove the pod-managed identity](#remove-pod-managed-identity) annotations from your application and then remove the pod-managed identity add-on.
44+
45+
- Rewrite your application to support the latest version of the [Azure Identity][azure-identity-supported-versions] client library. Afterwards, perform the following steps:
46+
47+
- Restart your application deployment to begin authenticating using the workload identity.
48+
- Once you verify the authentication transactions are completing successfully, you can [remove the pod-managed identity](#remove-pod-managed-identity) annotations from your application and then remove the pod-managed identity add-on.
49+
2150
## Create a managed identity
2251

2352
If you don't have a managed identity created and assigned to your pod, perform the following steps to create and grant the necessary permissions to storage, Key Vault, or whatever resources your application needs to authenticate with in Azure.
@@ -74,7 +103,7 @@ The following output resembles successful creation of the identity:
74103
Serviceaccount/workload-identity-sa created
75104
```
76105

77-
## Establish federated identity credential
106+
## Establish federated identity credential trust
78107

79108
Use the [az identity federated-credential create][az-identity-federated-credential-create] command to create the federated identity credential between the managed identity, the service account issuer, and the subject. Replace the values `resourceGroupName`, `userAssignedIdentityName`, `federatedIdentityName`, `serviceAccountNamespace`, and `serviceAccountName`.
80109

@@ -85,7 +114,7 @@ az identity federated-credential create --name federatedIdentityName --identity-
85114
> [!NOTE]
86115
> It takes a few seconds for the federated identity credential to be propagated after being initially added. If a token request is made immediately after adding the federated identity credential, it might lead to failure for a couple of minutes as the cache is populated in the directory with old data. To avoid this issue, you can add a slight delay after adding the federated identity credential.
87116
88-
## Deploy the workload
117+
## Deploy the workload with migration sidecar
89118

90119
If your application is using managed identity and still relies on IMDS to get an access token, you can use the workload identity migration sidecar to start migrating to workload identity. This sidecar is a migration solution and in the long-term applications, you should modify their code to use the latest Azure Identity SDKs that support client assertion.
91120

@@ -175,6 +204,10 @@ This article showed you how to set up your pod to authenticate using a workload
175204
[workload-identity-overview]: workload-identity-overview.md
176205
[az-identity-federated-credential-create]: /cli/azure/identity/federated-credential#az-identity-federated-credential-create
177206
[az-aks-pod-identity-delete]: /cli/azure/aks/pod-identity#az-aks-pod-identity-delete
207+
[azure-identity-supported-versions]: workload-identity-overview.md#dependencies
208+
[azure-identity-libraries]: ../active-directory/develop/reference-v2-libraries.md
209+
[openid-connect-overview]: ../active-directory/develop/v2-protocols-oidc.md
210+
[install-azure-cli]: /cli/azure/install-azure-cli
178211

179212
<!-- EXTERNAL LINKS -->
180-
[kubectl-describe]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe
213+
[kubectl-describe]: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#describe

articles/aks/workload-identity-overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ The following table summarizes our migration or deployment recommendations for w
111111

112112
|Scenario |Description |
113113
|---------|------------|
114-
| New or existing cluster deployment [runs a supported version](#dependencies) of Azure Identity client library | No migration steps are required.<br> Sample deployment resources:<br> - [Deploy and configure workload identity on a new cluster][deploy-configure-workload-identity-new-cluster]<br> - [Tutorial: Use a workload identity with an application on AKS][tutorial-use-workload-identity] |
115-
| New or existing cluster deployment [runs an unsupported version](#dependencies) of Azure Identity client library| Update container image to use a supported version of the Azure Identity SDK, or use the [migration sidecar][workload-identity-migration-sidecar]. |
114+
| New or existing cluster deployment [runs a supported version][azure-identity-libraries] of Azure Identity client library | No migration steps are required.<br> Sample deployment resources:<br> - [Deploy and configure workload identity on a new cluster][deploy-configure-workload-identity-new-cluster]<br> - [Tutorial: Use a workload identity with an application on AKS][tutorial-use-workload-identity] |
115+
| New or existing cluster deployment runs an unsupported version of Azure Identity client library| Update container image to use a supported version of the Azure Identity SDK, or use the [migration sidecar][workload-identity-migration-sidecar]. |
116116

117117
## Next steps
118118

@@ -134,7 +134,7 @@ The following table summarizes our migration or deployment recommendations for w
134134
[openid-connect-overview]: ../active-directory/develop/v2-protocols-oidc.md
135135
[deploy-configure-workload-identity-new-cluster]: workload-identity-deploy-cluster.md
136136
[tutorial-use-workload-identity]: ./learn/tutorial-kubernetes-workload-identity.md
137-
[workload-identity-migration-sidecar]: workload-identity-migration-sidecar.md
137+
[workload-identity-migration-sidecar]: workload-identity-migrate-from-pod-identity.md
138138
[dotnet-azure-identity-client-library]: /dotnet/api/overview/azure/identity-readme
139139
[java-azure-identity-client-library]: /java/api/overview/azure/identity-readme
140140
[javascript-azure-identity-client-library]: /javascript/api/overview/azure/identity-readme

0 commit comments

Comments
 (0)