Skip to content

Commit 96d123f

Browse files
Merge pull request #275315 from schaffererin/updateparams4
Updated command parameters with long-form formatting
2 parents 897b494 + 38e7040 commit 96d123f

10 files changed

+62
-62
lines changed

articles/aks/azure-cni-overlay.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ subscriptionId=$(az account show --query id -o tsv)
127127
vnetName="yourVnetName"
128128
subnetName="yourNewSubnetName"
129129
subnetResourceId="/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.Network/virtualNetworks/$vnetName/subnets/$subnetName"
130-
az aks nodepool add -g $resourceGroup --cluster-name $clusterName \
130+
az aks nodepool add --resource-group $resourceGroup --cluster-name $clusterName \
131131
--name $nodepoolName --node-count 1 \
132132
--mode system --vnet-subnet-id $subnetResourceId
133133
```
@@ -233,13 +233,13 @@ The following attributes are provided to support dual-stack clusters:
233233
1. Create an Azure resource group for the cluster using the [`az group create`][az-group-create] command.
234234

235235
```azurecli-interactive
236-
az group create -l <region> -n <resourceGroupName>
236+
az group create --location <region> --name <resourceGroupName>
237237
```
238238
239239
2. Create a dual-stack AKS cluster using the [`az aks create`][az-aks-create] command with the `--ip-families` parameter set to `ipv4,ipv6`.
240240
241241
```azurecli-interactive
242-
az aks create -l <region> -g <resourceGroupName> -n <clusterName> \
242+
az aks create --location <region> --resource-group <resourceGroupName> --name <clusterName> \
243243
--network-plugin azure \
244244
--network-plugin-mode overlay \
245245
--ip-families ipv4,ipv6

articles/aks/azure-cni-powered-by-cilium.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Azure CNI powered by Cilium currently has the following limitations:
7373
Use the following commands to create a cluster with an overlay network and Cilium. Replace the values for `<clusterName>`, `<resourceGroupName>`, and `<location>`:
7474

7575
```azurecli-interactive
76-
az aks create -n <clusterName> -g <resourceGroupName> -l <location> \
76+
az aks create --name <clusterName> --resource-group <resourceGroupName> --loctaion <location> \
7777
--network-plugin azure \
7878
--network-plugin-mode overlay \
7979
--pod-cidr 192.168.0.0/16 \
@@ -94,15 +94,15 @@ az group create --name <resourceGroupName> --location <location>
9494

9595
```azurecli-interactive
9696
# Create a virtual network with a subnet for nodes and a subnet for pods
97-
az network vnet create -g <resourceGroupName> --location <location> --name <vnetName> --address-prefixes <address prefix, example: 10.0.0.0/8> -o none
98-
az network vnet subnet create -g <resourceGroupName> --vnet-name <vnetName> --name nodesubnet --address-prefixes <address prefix, example: 10.240.0.0/16> -o none
99-
az network vnet subnet create -g <resourceGroupName> --vnet-name <vnetName> --name podsubnet --address-prefixes <address prefix, example: 10.241.0.0/16> -o none
97+
az network vnet create --resource-group <resourceGroupName> --location <location> --name <vnetName> --address-prefixes <address prefix, example: 10.0.0.0/8> -o none
98+
az network vnet subnet create --resource-group <resourceGroupName> --vnet-name <vnetName> --name nodesubnet --address-prefixes <address prefix, example: 10.240.0.0/16> -o none
99+
az network vnet subnet create --resource-group<resourceGroupName> --vnet-name <vnetName> --name podsubnet --address-prefixes <address prefix, example: 10.241.0.0/16> -o none
100100
```
101101

102102
Create the cluster using `--network-dataplane cilium`:
103103

104104
```azurecli-interactive
105-
az aks create -n <clusterName> -g <resourceGroupName> -l <location> \
105+
az aks create --name <clusterName> --resource-group <resourceGroupName> --location <location> \
106106
--max-pods 250 \
107107
--network-plugin azure \
108108
--vnet-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/nodesubnet \
@@ -131,7 +131,7 @@ To perform the upgrade, you will need Azure CLI version 2.52.0 or later. Run `az
131131
Use the following command to upgrade an existing cluster to Azure CNI Powered by Cilium. Replace the values for `<clusterName>` and `<resourceGroupName>`:
132132

133133
```azurecli-interactive
134-
az aks update -n <clusterName> -g <resourceGroupName> \
134+
az aks update --name <clusterName> --resource-group <resourceGroupName> \
135135
--network-dataplane cilium
136136
```
137137

articles/aks/configure-kubenet-dual-stack.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ The following attributes are provided to support dual-stack clusters:
7171
1. Create an Azure resource group for the cluster using the [`az group create`][az-group-create] command.
7272

7373
```azurecli-interactive
74-
az group create -l <region> -n <resourceGroupName>
74+
az group create --location <region> --name <resourceGroupName>
7575
```
7676
7777
2. Create a dual-stack AKS cluster using the [`az aks create`][az-aks-create] command with the `--ip-families` parameter set to `ipv4,ipv6`.
7878
7979
```azurecli-interactive
80-
az aks create -l <region> -g <resourceGroupName> -n <clusterName> --ip-families ipv4,ipv6
80+
az aks create --location <region> --resource-group <resourceGroupName> --name <clusterName> --ip-families ipv4,ipv6
8181
```
8282
8383
3. Once the cluster is created, get the cluster admin credentials using the [`az aks get-credentials`][az-aks-get-credentials] command.
8484
8585
```azurecli-interactive
86-
az aks get-credentials -g <resourceGroupName> -n <clusterName>
86+
az aks get-credentials --resource-group <resourceGroupName> --name <clusterName>
8787
```
8888
8989
# [Azure Resource Manager](#tab/azure-resource-manager)
@@ -151,7 +151,7 @@ The following attributes are provided to support dual-stack clusters:
151151
2. Once the cluster is created, get the cluster admin credentials using the [`az aks get-credentials`][az-aks-get-credentials] command.
152152
153153
```azurecli-interactive
154-
az aks get-credentials -g <resourceGroupName> -n <clusterName>
154+
az aks get-credentials --resource-group <resourceGroupName> --name <clusterName>
155155
```
156156
157157
> [!NOTE]
@@ -198,7 +198,7 @@ The following attributes are provided to support dual-stack clusters:
198198
2. Once the cluster is created, get the cluster admin credentials using the [`az aks get-credentials`][az-aks-get-credentials] command.
199199
200200
```azurecli-interactive
201-
az aks get-credentials -g <resourceGroupName> -n <clusterName>
201+
az aks get-credentials --resource-group <resourceGroupName> --name <clusterName>
202202
```
203203
204204
> [!NOTE]

articles/aks/csi-secrets-store-configuration-options.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ Follow the steps in [Use the Azure Key Vault provider for Secrets Store CSI Driv
3434
* Enable auto-rotation of secrets on a new cluster using the [`az aks create`][az-aks-create] command and enable the `enable-secret-rotation` add-on.
3535

3636
```azurecli-interactive
37-
az aks create -n myAKSCluster2 -g myResourceGroup --enable-addons azure-keyvault-secrets-provider --enable-secret-rotation
37+
az aks create --name myAKSCluster2 --resource-group myResourceGroup --enable-addons azure-keyvault-secrets-provider --enable-secret-rotation
3838
```
3939
4040
#### Enable auto-rotation on an existing AKS cluster
4141
4242
* Update an existing cluster to enable auto-rotation of secrets using the [`az aks addon update`][az-aks-addon-update] command and the `enable-secret-rotation` parameter.
4343
4444
```azurecli-interactive
45-
az aks addon update -g myResourceGroup -n myAKSCluster2 -a azure-keyvault-secrets-provider --enable-secret-rotation
45+
az aks addon update --resource-group myResourceGroup --name myAKSCluster2 --addon azure-keyvault-secrets-provider --enable-secret-rotation
4646
```
4747
4848
#### Specify a custom rotation interval
4949
5050
* Specify a custom rotation interval using the [`az aks addon update`][az-aks-addon-update] command with the `rotation-poll-interval` parameter.
5151
5252
```azurecli-interactive
53-
az aks addon update -g myResourceGroup -n myAKSCluster2 -a azure-keyvault-secrets-provider --enable-secret-rotation --rotation-poll-interval 5m
53+
az aks addon update --resource-group myResourceGroup --name myAKSCluster2 --addon azure-keyvault-secrets-provider --enable-secret-rotation --rotation-poll-interval 5m
5454
```
5555
5656
#### Disable auto-rotation
@@ -60,13 +60,13 @@ To disable auto-rotation, you first need to disable the add-on. Then, you can re
6060
1. Disable the secrets provider add-on using the [`az aks addon disable`][az-aks-addon-disable] command.
6161
6262
```azurecli-interactive
63-
az aks addon disable -g myResourceGroup -n myAKSCluster2 -a azure-keyvault-secrets-provider
63+
az aks addon disable --resource-group myResourceGroup --name myAKSCluster2 --addon azure-keyvault-secrets-provider
6464
```
6565
6666
2. Re-enable the secrets provider add-on without the `enable-secret-rotation` parameter using the [`az aks addon enable`][az-aks-addon-enable] command.
6767
6868
```azurecli-interactive
69-
az aks addon enable -g myResourceGroup -n myAKSCluster2 -a azure-keyvault-secrets-provider
69+
az aks addon enable --resource-group myResourceGroup --name myAKSCluster2 --addon azure-keyvault-secrets-provider
7070
```
7171
7272
If you are already using a `SecretProviderClass`, you can update the add-on without disabling it first by using `az aks addon enable` without specifying the `enable-secret-rotation` parameter.

articles/aks/csi-secrets-store-identity-access.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ In this security model, the AKS cluster acts as token issuer. Microsoft Entra ID
5454
```azurecli-interactive
5555
az identity create --name $UAMI --resource-group $RESOURCE_GROUP
5656
57-
export USER_ASSIGNED_CLIENT_ID="$(az identity show -g $RESOURCE_GROUP --name $UAMI --query 'clientId' -o tsv)"
57+
export USER_ASSIGNED_CLIENT_ID="$(az identity show --resource-group $RESOURCE_GROUP --name $UAMI --query 'clientId' -o tsv)"
5858
export IDENTITY_TENANT=$(az aks show --name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --query identity.tenantId -o tsv)
5959
```
6060
@@ -194,18 +194,18 @@ In this security model, you can grant access to your cluster's resources to team
194194
1. Access your key vault using the [`az aks show`][az-aks-show] command and the user-assigned managed identity created by the add-on. You should also retrieve the identity's `clientId`, which you'll use in later steps when creating a `SecretProviderClass`.
195195
196196
```azurecli-interactive
197-
az aks show -g <resource-group> -n <cluster-name> --query addonProfiles.azureKeyvaultSecretsProvider.identity.objectId -o tsv
198-
az aks show -g <resource-group> -n <cluster-name> --query addonProfiles.azureKeyvaultSecretsProvider.identity.clientId -o tsv
197+
az aks show --resource-group <resource-group> --name <cluster-name> --query addonProfiles.azureKeyvaultSecretsProvider.identity.objectId -o tsv
198+
az aks show --resource-group <resource-group> --name <cluster-name> --query addonProfiles.azureKeyvaultSecretsProvider.identity.clientId -o tsv
199199
```
200200
201201
Alternatively, you can create a new managed identity and assign it to your virtual machine (VM) scale set or to each VM instance in your availability set using the following commands.
202202
203203
```azurecli-interactive
204-
az identity create -g <resource-group> -n <identity-name>
205-
az vmss identity assign -g <resource-group> -n <agent-pool-vmss> --identities <identity-resource-id>
206-
az vm identity assign -g <resource-group> -n <agent-pool-vm> --identities <identity-resource-id>
204+
az identity create -resource-group <resource-group> --name <identity-name>
205+
az vmss identity assign --resource-group <resource-group> --name <agent-pool-vmss> --identities <identity-resource-id>
206+
az vm identity assign --resource-group <resource-group> --name <agent-pool-vm> --identities <identity-resource-id>
207207
208-
az identity show -g <resource-group> --name <identity-name> --query 'clientId' -o tsv
208+
az identity show --resource-group <resource-group> --name <identity-name> --query 'clientId' -o tsv
209209
```
210210
211211
2. Create a role assignment that grants the identity permission to access the key vault secrets, access keys, and certificates using the [`az role assignment create`][az-role-assignment-create] command.
@@ -221,7 +221,7 @@ In this security model, you can grant access to your cluster's resources to team
221221
> ```
222222
223223
```azurecli-interactive
224-
export IDENTITY_OBJECT_ID="$(az identity show -g <resource-group> --name <identity-name> --query 'principalId' -o tsv)"
224+
export IDENTITY_OBJECT_ID="$(az identity show --resource-group <resource-group> --name <identity-name> --query 'principalId' -o tsv)"
225225
export KEYVAULT_SCOPE=$(az keyvault show --name <key-vault-name> --query id -o tsv)
226226
227227
# Example command for key vault with RBAC enabled using `key` type
@@ -339,7 +339,7 @@ A key vault certificate also contains public x509 certificate metadata. The key
339339
- Disable the Azure Key Vault provider for Secrets Store CSI Driver capability in an existing cluster using the [`az aks disable-addons`][az-aks-disable-addons] command with the `azure-keyvault-secrets-provider` add-on.
340340
341341
```azurecli-interactive
342-
az aks disable-addons --addons azure-keyvault-secrets-provider -g myResourceGroup -n myAKSCluster
342+
az aks disable-addons --addons azure-keyvault-secrets-provider --resource-group myResourceGroup --name myAKSCluster
343343
```
344344
345345
> [!NOTE]

articles/aks/csi-secrets-store-nginx-tls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ You can import the ingress TLS certificate to the cluster using one of the follo
5050
2. Import the certificate using the [`az keyvault certificate import`][az-key-vault-certificate-import] command.
5151

5252
```azurecli-interactive
53-
az keyvault certificate import --vault-name $AKV_NAME -n $CERT_NAME -f $CERT_NAME.pfx
53+
az keyvault certificate import --vault-name $AKV_NAME --name $CERT_NAME --file $CERT_NAME.pfx
5454
```
5555

5656
## Deploy a SecretProviderClass

articles/aks/egress-outboundtype.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ Migration is only supported between `loadBalancer`, `managedNATGateway` (if usin
107107
### Update cluster from loadbalancer to managedNATGateway
108108

109109
```azurecli-interactive
110-
az aks update -g <resourceGroup> -n <clusterName> --outbound-type managedNATGateway --nat-gateway-managed-outbound-ip-count <number of managed outbound ip>
110+
az aks update --resource-group <resourceGroup> --name <clusterName> --outbound-type managedNATGateway --nat-gateway-managed-outbound-ip-count <number of managed outbound ip>
111111
```
112112

113113
### Update cluster from managedNATGateway to loadbalancer
114114

115115
```azurecli-interactive
116-
az aks update -g <resourceGroup> -n <clusterName> \
116+
az aks update --resource-group <resourceGroup> --name <clusterName> \
117117
--outbound-type loadBalancer \
118118
<--load-balancer-managed-outbound-ip-count <number of managed outbound ip>| --load-balancer-outbound-ips <outbound ip ids> | --load-balancer-outbound-ip-prefixes <outbound ip prefix ids> >
119119
```
@@ -126,15 +126,15 @@ az aks update -g <resourceGroup> -n <clusterName> \
126126
- Add route `0.0.0.0/0` to default route table. Please refer to [Customize cluster egress with a user-defined routing table in Azure Kubernetes Service (AKS)](egress-udr.md)
127127

128128
```azurecli-interactive
129-
az aks update -g <resourceGroup> -n <clusterName> --outbound-type userDefinedRouting
129+
az aks update --resource-group <resourceGroup> --name <clusterName> --outbound-type userDefinedRouting
130130
```
131131

132132
### Update cluster from loadbalancer to userAssignedNATGateway in BYO vnet scenario
133133

134134
- Associate nat gateway with subnet where the workload is associated with. Refer to [Create a managed or user-assigned NAT gateway](nat-gateway.md)
135135

136136
```azurecli-interactive
137-
az aks update -g <resourceGroup> -n <clusterName> --outbound-type userAssignedNATGateway
137+
az aks update --resource-group <resourceGroup> --name <clusterName> --outbound-type userAssignedNATGateway
138138
```
139139

140140
## Next steps

0 commit comments

Comments
 (0)