@@ -471,14 +471,9 @@ export AZURE_SUBSCRIPTION_ID="<SubscriptionId>"
471
471
# Create an Azure Service Principal and paste the output here
472
472
export AZURE_TENANT_ID=" <Tenant>"
473
473
export AZURE_CLIENT_ID=" <AppId>"
474
+ export AZURE_CLIENT_ID_USER_ASSIGNED_IDENTITY=$AZURE_CLIENT_ID # for compatibility with CAPZ v1.16 templates
474
475
export AZURE_CLIENT_SECRET="<Password>"
475
476
476
- # Base64 encode the variables
477
- export AZURE_SUBSCRIPTION_ID_B64=" $( echo -n " $AZURE_SUBSCRIPTION_ID " | base64 | tr -d ' \n' ) "
478
- export AZURE_TENANT_ID_B64=" $( echo -n " $AZURE_TENANT_ID " | base64 | tr -d ' \n' ) "
479
- export AZURE_CLIENT_ID_B64=" $( echo -n " $AZURE_CLIENT_ID " | base64 | tr -d ' \n' ) "
480
- export AZURE_CLIENT_SECRET_B64=" $( echo -n " $AZURE_CLIENT_SECRET " | base64 | tr -d ' \n' ) "
481
-
482
477
# Settings needed for AzureClusterIdentity used by the AzureCluster
483
478
export AZURE_CLUSTER_IDENTITY_SECRET_NAME="cluster-identity-secret"
484
479
export CLUSTER_IDENTITY_NAME="cluster-identity"
@@ -1351,7 +1346,7 @@ For more information about prerequisites, credentials management, or permissions
1351
1346
1352
1347
For the purpose of this tutorial, we'll name our cluster capi-quickstart.
1353
1348
1354
- {{#tabs name:"tab-clusterctl-config-cluster" tabs:"Docker, vcluster, KubeVirt, Other providers..."}}
1349
+ {{#tabs name:"tab-clusterctl-config-cluster" tabs:"Docker, vcluster, KubeVirt, Azure, Other providers..."}}
1355
1350
{{#tab Docker}}
1356
1351
1357
1352
<aside class="note warning">
@@ -1402,6 +1397,22 @@ clusterctl generate cluster capi-quickstart \
1402
1397
> capi-quickstart.yaml
1403
1398
` ` `
1404
1399
1400
+ {{# /tab }}
1401
+ {{#tab Azure}}
1402
+
1403
+ ` ` ` bash
1404
+ clusterctl generate cluster capi-quickstart \
1405
+ --infrastructure azure \
1406
+ --kubernetes-version v1.30.0 \
1407
+ --control-plane-machine-count=3 \
1408
+ --worker-machine-count=3 \
1409
+ > capi-quickstart.yaml
1410
+
1411
+ # Cluster templates authenticate with Workload Identity by default. Modify the AzureClusterIdentity for ServicePrincipal authentication.
1412
+ # See https://capz.sigs.k8s.io/topics/identities for more details.
1413
+ yq -i " with(. | select(.kind == \" AzureClusterIdentity\" ); .spec.type |= \" ServicePrincipal\" | .spec.clientSecret.name |= \" ${AZURE_CLUSTER_IDENTITY_SECRET_NAME} \" | .spec.clientSecret.namespace |= \" ${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE} \" )" capi-quickstart.yaml
1414
+ ` ` `
1415
+
1405
1416
{{# /tab }}
1406
1417
{{#tab Other providers...}}
1407
1418
0 commit comments