Skip to content

Commit dba860f

Browse files
authored
Merge pull request #10859 from k8s-infra-cherrypick-robot/cherry-pick-10857-to-release-1.7
[release-1.7] 📖 update Azure quick start for CAPZ v1.16
2 parents 53f0c53 + 2919fee commit dba860f

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

docs/book/src/user/quick-start.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,9 @@ export AZURE_SUBSCRIPTION_ID="<SubscriptionId>"
471471
# Create an Azure Service Principal and paste the output here
472472
export AZURE_TENANT_ID="<Tenant>"
473473
export AZURE_CLIENT_ID="<AppId>"
474+
export AZURE_CLIENT_ID_USER_ASSIGNED_IDENTITY=$AZURE_CLIENT_ID # for compatibility with CAPZ v1.16 templates
474475
export AZURE_CLIENT_SECRET="<Password>"
475476
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-
482477
# Settings needed for AzureClusterIdentity used by the AzureCluster
483478
export AZURE_CLUSTER_IDENTITY_SECRET_NAME="cluster-identity-secret"
484479
export CLUSTER_IDENTITY_NAME="cluster-identity"
@@ -1351,7 +1346,7 @@ For more information about prerequisites, credentials management, or permissions
13511346
13521347
For the purpose of this tutorial, we'll name our cluster capi-quickstart.
13531348
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..."}}
13551350
{{#tab Docker}}
13561351
13571352
<aside class="note warning">
@@ -1402,6 +1397,22 @@ clusterctl generate cluster capi-quickstart \
14021397
> capi-quickstart.yaml
14031398
```
14041399
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+
14051416
{{#/tab }}
14061417
{{#tab Other providers...}}
14071418

0 commit comments

Comments
 (0)