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
This is the identity used by the management cluster to provision infrastructure in Azure
5
-
- Multi-tenant config via AzureClusterIdentity
6
-
-[AAD Pod Identity](https://azure.github.io/aad-pod-identity/) using Service Principals and Managed Identities: by default, the identity used by the workload cluster running on Azure is the same Service Principal assigned to the management cluster. If an identity is specified on the Azure Cluster Resource, that identity will be used when creating Azure resources related to that cluster. See [Multi-tenancy](multitenancy.md) page for details.
7
-
More details in [Azure built-in roles documentation](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles).
3
+
This describes some common user stories for identities being utilized with CAPZ.
4
+
Please see the core [identities page](identities.md) first.
5
+
Also see related [identities use cases](identities-use-cases.md) and [Multi-tenancy](multitenancy.md) pages.
8
6
9
-
<asideclass="note warning">
10
-
11
-
<h1> Warning </h1>
12
-
13
-
The capability to set credentials using environment variables has been removed, the required approach is to use `AzureClusterIdentity` as explained [here](multitenancy.md)
14
-
15
-
</aside>
16
-
17
-
## Azure Host Identity:
18
-
The identity assigned to the Azure host which in the control plane provides the identity to Azure Cloud Provider, and can be used on all nodes to provide access to Azure services during cloud-init, etc.
19
-
20
-
- User-assigned Managed Identity
21
-
- System-assigned Managed Identity
22
-
- Service Principal
23
-
- See details about each type in the [VM identity](vm-identity.md) page
24
-
25
-
## Pod Identity:
26
-
The identity used by pods running within the workload cluster to provide access to Azure services during runtime. For example, to access blobs stored in Azure Storage or to access Azure database services.
27
-
-[AAD Pod Identity](https://azure.github.io/aad-pod-identity/): The workload cluster requires an identity to communicate with Azure. This identity can be either a managed identity (in the form of system-assigned identity or user-assigned identity) or a service principal. The AAD Pod Identity pod allows the cluster to use the Identity referenced by the Azure CLuster to access cloud resources securely with Azure Active Directory.
28
-
29
-
## User Stories
30
-
31
-
#### Story 1 - Locked down with Service Principal Per Subscription
7
+
## Story 1 - Locked down with Service Principal Per Subscription
32
8
33
9
Alex is an engineer in a large organization which has a strict Azure account architecture. This architecture dictates that Kubernetes clusters must be hosted in dedicated Subscriptions with AAD identity having RBAC rights to provision the infrastructure only in the Subscription. The workload clusters must run with a System Assigned machine identity. The organization has adopted Cluster API in order to manage Kubernetes infrastructure, and expects 'management' clusters running the Cluster API controllers to manage 'workload' clusters in dedicated Azure Subscriptions with an AAD account which only has access to that Subscription.
34
10
35
11
The current configuration exists:
36
-
* Subscription for each cluster
37
-
* AAD Service Principals with Subscription Owner rights for each Subscription
38
-
* A management Kubernetes cluster running Cluster API Provider Azure controllers
12
+
13
+
- Subscription for each cluster
14
+
- AAD Service Principals with Subscription Owner rights for each Subscription
15
+
- A management Kubernetes cluster running Cluster API Provider Azure controllers
39
16
40
17
Alex can provision a new workload cluster in the specified Subscription with the corresponding AAD Service Principal by creating new Cluster API resources in the management cluster. Each of the workload cluster machines would run as the System Assigned identity described in the Cluster API resources. The CAPZ controller in the management cluster uses the Service Principal credentials when reconciling the AzureCluster so that it can create/use/destroy resources in the workload cluster.
41
18
42
-
####Story 2 - Locked down by Namespace and Subscription
19
+
## Story 2 - Locked down by Namespace and Subscription
43
20
44
21
Alex is an engineer in a large organization which has a strict Azure account architecture. This architecture dictates that Kubernetes clusters must be hosted in dedicated Subscriptions with AAD identity having RBAC rights to provision the infrastructure only in the Subscription. The workload clusters must run with a System Assigned machine identity.
45
22
@@ -49,26 +26,23 @@ The organization has adopted Cluster API in order to manage Kubernetes infrastru
49
26
API controllers to manage 'workload' clusters in dedicated Azure Subscriptions with an AAD account which only has access to that Subscription.
50
27
51
28
The current configuration exists:
52
-
* Subscription for each cluster
53
-
* AAD Service Principals with Subscription Owner rights for each Subscription
54
-
* A management Kubernetes cluster running Cluster API Provider Azure controllers
29
+
30
+
- Subscription for each cluster
31
+
- AAD Service Principals with Subscription Owner rights for each Subscription
32
+
- A management Kubernetes cluster running Cluster API Provider Azure controllers
55
33
56
34
Alex can provision a new workload cluster in the specified Subscription with the corresponding AAD Service Principal by creating new Cluster API resources in the management cluster in the predetermined namespace. Each of the workload cluster machines would run as the System Assigned identity described in the Cluster API resources. The CAPZ controller in the management cluster uses the Service Principal credentials when reconciling the AzureCluster so that it can create/use/destroy resources in the workload cluster.
57
35
58
36
Erin can provision an identity in a namespace of limited access and define the allowed namespaces, which will include the predetermined namespace for the workload cluster.
59
37
60
-
####Story 3 - Using an Azure User Assigned Identity
38
+
## Story 3 - Using an Azure User Assigned Identity
61
39
62
40
Erin is an engineer working in a large organization. Erin does not want to be responsible for ensuring Service Principal secrets are rotated on a regular basis. Erin would like to use an Azure User Assigned Identity to provision workload cluster infrastructure. The User Assigned Identity will have the RBAC rights needed to provision the infrastructure in Erin's subscription.
63
41
64
42
The current configuration exists:
65
43
66
-
* Subscription for the workload cluster
67
-
* A User Assigned Identity with RBAC with Subscription Owner rights for the Subscription
68
-
* A management Kubernetes cluster running Cluster API Provider Azure controllers
44
+
- Subscription for the workload cluster
45
+
- A User Assigned Identity with RBAC with Subscription Owner rights for the Subscription
46
+
- A management Kubernetes cluster running Cluster API Provider Azure controllers
69
47
70
48
Erin can provision a new workload cluster in the specified Subscription with the Azure User Assigned Identity by creating new Cluster API resources in the management cluster. The CAPZ controller in the management cluster uses the User Assigned Identity credentials when reconciling the AzureCluster so that it can create/use/destroy resources in the workload cluster.
71
-
72
-
#### Story 4 - Legacy Behavior Preserved
73
-
74
-
Dascha is an engineer in a smaller, less strict organization with a few Azure accounts intended to build all infrastructure. There is a single Azure Subscription named 'dev', and Dascha wants to provision a new cluster in this Subscription. An existing Kubernetes cluster is already running the Cluster API operators and managing resources in the dev Subscription. Dascha can provision a new cluster by creating Cluster API resources in the existing cluster, omitting the ProvisionerIdentity field in the AzureCluster spec. The CAPZ operator will use the Azure credentials provided in its deployment template.
Identities are used on the management cluster and the VMs/clusters/workloads which get provisioned by the management cluster.
4
+
Also see relevant [identities use cases](identities-use-cases.md), [Azure Active Directory integration](aad-integration.md), and [Multi-tenancy](multitenancy.md) pages.
5
+
6
+
## Deprecated Identity Types
7
+
8
+
<asideclass="note warning">
9
+
10
+
<h1> Warning </h1>
11
+
The capability to set credentials using environment variables has been removed, the required approach is to use `AzureClusterIdentity` as shown with the below supported identity examples.
12
+
</aside>
13
+
14
+
<asideclass="note warning">
15
+
<h1> Warning </h1>
16
+
All of the methods which utilize AAD Pod Identity will no longer function starting in the 1.13 release of CAPZ.
17
+
</aside>
18
+
19
+
For more details on the deprecated Pod identity types, [see this page](multitenancy.md#deprecated-identity-types)
20
+
21
+
## Workload Identity (Recommended)
22
+
23
+
Follow this [link](./workload-identity.md) for a quick start guide on setting up workload identity.
24
+
25
+
Once you've set up the management cluster with the workload identity (see link above), the corresponding values should be used to create an `AzureClusterIdentity` resource. Create an `azure-cluster-identity.yaml` file with the following content:
Manual Service Principal Identity uses the service principal's `clientSecret` directly fetched from the secret containing it. To use this type of identity, set the identity type as `ManualServicePrincipal` in `AzureClusterIdentity`. For example,
The identity assigned to the Azure host which in the control plane provides the identity to Azure Cloud Provider, and can be used on all nodes to provide access to Azure services during cloud-init, etc.
64
+
65
+
- User-assigned Managed Identity
66
+
- System-assigned Managed Identity
67
+
- Service Principal
68
+
- See details about each type in the [VM identity](vm-identity.md) page
69
+
70
+
More details in [Azure built-in roles documentation](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles).
Copy file name to clipboardExpand all lines: docs/book/src/topics/multitenancy.md
+21-75Lines changed: 21 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,29 +2,32 @@
2
2
3
3
To enable single controller multi-tenancy, a different Identity can be added to the Azure Cluster that will be used as the Azure Identity when creating Azure resources related to that cluster.
4
4
5
-
This is achieved using [workload identity](https://azure.github.io/azure-workload-identity). Workload identity is the next iteration of the now deprecated [aad-pod-identity](https://azure.github.io/aad-pod-identity).
5
+
This is achieved using [workload identity](workload-identity.md).
6
6
7
-
## Identity Types
7
+
## Supported Identity Types
8
8
9
-
### Workload Identity (Recommended)
9
+
Please read the [identities](identities.md) page for more information on the supported identity types.
10
10
11
-
Follow this [link](./workload-identity.md) for a quick start guide on setting up workload identity.
11
+
### allowedNamespaces
12
12
13
-
Once you've set up the management cluster with the workload identity (see link above), the corresponding values should be used to create an `AzureClusterIdentity` resource. Create an `azure-cluster-identity.yaml` file with the following content:
13
+
AllowedNamespaces is used to identify the namespaces the clusters are allowed to use the identity from. Namespaces can be selected either using an array of namespaces or with label selector.
14
+
An empty allowedNamespaces object indicates that AzureClusters can use this identity from any namespace.
15
+
If this object is nil, no namespaces will be allowed (default behavior, if this field is not provided)
16
+
A namespace should be either in the NamespaceList or match with Selector to use the identity.
17
+
Please note NamespaceList will take precedence over Selector if both are set.
The capability to set credentials using environment variables has been removed, the required approach is to use `AzureClusterIdentity` as seen in the [identities](identities.md) page.
25
+
</aside>
26
+
27
+
<asideclass="note warning">
28
+
<h1> Warning </h1>
29
+
All of the remaining methods utilize AAD Pod Identity and will no longer function starting in the 1.13 release of CAPZ.
30
+
</aside>
28
31
29
32
### AAD Pod Identity using Service Principal With Client Password (Deprecated)
30
33
@@ -153,60 +156,3 @@ spec:
153
156
#### Assigning VM identities for cloud-provider authentication
154
157
155
158
When using a user-assigned managed identity to create the workload cluster, a VM identity should also be assigned to each control-plane machine in the workload cluster for Cloud Provider to use. See [here](../topics/vm-identity.md#managed-identities) for more information.
156
-
157
-
### Manual Service Principal Identity
158
-
159
-
Manual Service Principal Identity is similar to [Service Principal Identity](https://capz.sigs.k8s.io/topics/multitenancy.html#service-principal-identity) except that the service principal's `clientSecret` is directly fetched from the secret containing it.
160
-
To use this type of identity, set the identity type as `ManualServicePrincipal` in `AzureClusterIdentity`. For example,
The rest of the configuration is the same as that of service principal identity. This useful in scenarios where you don't want to have a dependency on [aad-pod-identity](https://azure.github.io/aad-pod-identity).
179
-
180
-
## allowedNamespaces
181
-
182
-
AllowedNamespaces is used to identify the namespaces the clusters are allowed to use the identity from. Namespaces can be selected either using an array of namespaces or with label selector.
183
-
An empty allowedNamespaces object indicates that AzureClusters can use this identity from any namespace.
184
-
If this object is nil, no namespaces will be allowed (default behaviour, if this field is not provided)
185
-
A namespace should be either in the NamespaceList or match with Selector to use the identity.
186
-
Please note NamespaceList will take precedence over Selector if both are set.
187
-
188
-
## IdentityRef in AzureCluster
189
-
190
-
The Identity can be added to an `AzureCluster` by using `IdentityRef` field:
0 commit comments