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
Azure AD Workload identity is the next iteration of Azure AD Pod identity
4
-
that enables Kubernetes applications (e.g. CAPZ) to access Azure cloud
3
+
Azure AD Workload identity is the next iteration of Azure AD Pod identity
4
+
that enables Kubernetes applications such as CAPZ to access Azure cloud
5
5
resources securely with Azure Active Directory.
6
6
7
-
This document describes a quick start guide of using workload identity and
8
-
assumes that you have access to Azure cloud.
7
+
Let's help you get started using workload identity. We assume
8
+
you have access to Azure cloud services.
9
9
10
-
Workload identity is currently worked upon and cloud provider azure
11
-
integration is in progress. Please refer to [this](https://github.com/kubernetes-sigs/cluster-api-provider-azure/issues/3589) issue for details.
12
-
For more information, please refer to the [proposal](https://github.com/kubernetes-sigs/cluster-api-provider-azure/blob/main/docs/proposals/20221611-workload-identity-integration.md)
10
+
## Quick start
13
11
14
-
##Workload Identity Quick Start Guide
12
+
### Set up a management cluster with kind
15
13
16
-
### Setting Up Management Cluster on Kind
14
+
- Create a private and public key pair. For example, using OpenSSL:
17
15
18
-
- Create a public and private key pair. For example, you can generate the
19
-
key pairs using OpenSSL.
16
+
```bash
17
+
openssl genrsa -out sa.key 2048
18
+
openssl rsa -in sa.key -pubout -out sa.pub
19
+
```
20
20
21
-
Generate a private key called `sa.key` using the following command:
22
-
```bash
23
-
$ openssl genrsa -out sa.key 2048
24
-
```
21
+
Set the environment variable `SERVICE_ACCOUNT_SIGNING_KEY_FILE` to the full path
22
+
of the `sa.key` private key file you just generated, and set `SERVICE_ACCOUNT_KEY_FILE`
23
+
to the generated `sa.pub` public key file.
25
24
26
-
Set the environment variable `SERVICE_ACCOUNT_SIGNING_KEY_FILE` to the path of the
27
-
generated `sa.key`. This ENV var will be used in the upcoming step.
28
-
Note: You can use `readlink -f sa.key` to get the absolute path of the key file.
Set the environment variable `SERVICE_ACCOUNT_KEY_FILE` to the path of the
35
-
generated `sa.pub`. This ENV var will be used in the upcoming step.
36
-
37
-
- Create and upload Discovery and JWKS document using this [link](https://azure.github.io/azure-workload-identity/docs/installation/self-managed-clusters/oidc-issuer.html)
38
-
39
-
- At this stage, you will need to create TWO federated identity credentials: one for CAPZ and one for ASO.
40
-
- You can create those either with Azure AD application or user-assigned
41
-
identity. Please note that user assigned identity will need to be created
42
-
regardless because cloud provider azure integration is not yet done. The
43
-
steps are mentioned in the next section of workload cluster creation.
44
-
- The next list items links to steps on creating the federated
45
-
identity credentials. You will need to set up several environment
46
-
variables for each one:
47
-
-`SERVICE_ACCOUNT_NAMESPACE` : Namespace where the capz-manager and
48
-
azureserviceoperator-controller-manager pods will run.
49
-
-`SERVICE_ACCOUNT_NAME` : Name of the capz-manager or azureserviceoperator-default k8s service account.
50
-
-`SERVICE_ACCOUNT_ISSUER` : This is the path of the Azure storage
51
-
container which you created in the previous step which is:
- Create federated identity credentials for each of CAPZ and ASO using the steps outlined [here](https://azure.github.io/azure-workload-identity/docs/topics/federated-identity-credential.html)
55
-
You can either use `user-assigned-identity` or `AD application` to create federated identity credential and add `contributor` role to it.
56
-
57
-
- Create a Kind cluster with necessary flags with the following command:
30
+
These environment variables will be used later, when creating the kind cluster.
- Initialize a management cluster using `clusterctl` using the below command.
85
-
If you do not have `clusterctl` installed, then follow this [link](https://cluster-api.sigs.k8s.io/user/quick-start.html#install-clusterctl)
86
-
to install.
87
-
```bash
88
-
$ clusterctl init --infrastructure azure
89
-
```
34
+
Create and upload a JWKS discovery document by following [these instructions](https://azure.github.io/azure-workload-identity/docs/installation/self-managed-clusters/oidc-issuer.html).
35
+
36
+
- Create two federated identity credentials
37
+
38
+
Export environment variables used for creating a federated identity credential:
39
+
40
+
-`SERVICE_ACCOUNT_NAMESPACE`: Namespace where the capz-manager and
41
+
azureserviceoperator-controller-manager pods will run. Default is `capz-system`.
42
+
-`SERVICE_ACCOUNT_NAME`: Name of the capz-manager or azureserviceoperator-default k8s service account. Default is `capz-manager` for CAPZ and `azureserviceoperator-default` for ASO.
43
+
-`SERVICE_ACCOUNT_ISSUER`: Path of the Azure storage container created in the previous step, specifically:
Create two federated identity credentials, one for CAPZ and one for ASO, by following [these instructions](https://azure.github.io/azure-workload-identity/docs/topics/federated-identity-credential.html). You'll need to set `SERVICE_ACCOUNT_NAME` and `SERVICE_ACCOUNT_NAMESPACE` to different values for each credential.
47
+
Use either `user-assigned-identity` or `AD application` when creating the credentials, and add the `contributor` role to each.
48
+
49
+
- Create a kind cluster with the following command:
0 commit comments