Skip to content

Commit 974a47f

Browse files
Merge pull request #275310 from schaffererin/updateparams3
Updated command parameters with long-form formatting
2 parents 7d69ca6 + a4baa7b commit 974a47f

8 files changed

+38
-38
lines changed

articles/aks/access-control-managed-azure-ad.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ When you integrate Microsoft Entra ID with your AKS cluster, you can use [Condit
9595
6. Create the AKS cluster with AKS-managed Microsoft Entra integration using the [`az aks create`][az-aks-create] command with the `--aad-admin-group-objects-ids` and `--aad-tenant-id parameters` and include the values noted in the steps earlier.
9696
9797
```azurecli-interactive
98-
az aks create -g myResourceGroup -n myManagedCluster --enable-aad --aad-admin-group-object-ids <object-id> --aad-tenant-id <tenant-id>
98+
az aks create --resource-group myResourceGroup --name myManagedCluster --enable-aad --aad-admin-group-object-ids <object-id> --aad-tenant-id <tenant-id>
9999
```
100100
101101
7. In the Azure portal, select **Activity** > **Privileged Access (Preview)** > **Enable Privileged Access**.

articles/aks/enable-authentication-microsoft-entra-id.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The following requirements need to be met in order to properly install the AKS a
5454
2. Create an AKS cluster and enable administration access for your Microsoft Entra group using the [`az aks create`][az-aks-create] command.
5555
5656
```azurecli-interactive
57-
az aks create -g myResourceGroup -n myManagedCluster --enable-aad --aad-admin-group-object-ids <id> [--aad-tenant-id <id>]
57+
az aks create --resource-group myResourceGroup --name myManagedCluster --enable-aad --aad-admin-group-object-ids <id> [--aad-tenant-id <id>]
5858
```
5959
6060
A successful creation of an AKS-managed Microsoft Entra ID cluster has the following section in the response body:
@@ -77,7 +77,7 @@ The following requirements need to be met in order to properly install the AKS a
7777
Enable AKS-managed Microsoft Entra integration on your existing Kubernetes RBAC enabled cluster using the [`az aks update`][az-aks-update] command. Make sure to set your admin group to keep access on your cluster.
7878
7979
```azurecli-interactive
80-
az aks update -g MyResourceGroup -n myManagedCluster --enable-aad --aad-admin-group-object-ids <id-1>,<id-2> [--aad-tenant-id <id>]
80+
az aks update --resource-group MyResourceGroup --name myManagedCluster --enable-aad --aad-admin-group-object-ids <id-1>,<id-2> [--aad-tenant-id <id>]
8181
```
8282

8383
A successful activation of an AKS-managed Microsoft Entra ID cluster has the following section in the response body:
@@ -106,7 +106,7 @@ If your cluster uses legacy Microsoft Entra integration, you can upgrade to AKS-
106106
> After the upgrade, the kubeconfig content changes. You need to run `az aks get-credentials --resource-group <AKS resource group name> --name <AKS cluster name>` to merge the new credentials into the kubeconfig file.
107107
108108
```azurecli-interactive
109-
az aks update -g myResourceGroup -n myManagedCluster --enable-aad --aad-admin-group-object-ids <id> [--aad-tenant-id <id>]
109+
az aks update --resource-group myResourceGroup --name myManagedCluster --enable-aad --aad-admin-group-object-ids <id> [--aad-tenant-id <id>]
110110
```
111111

112112
A successful migration of an AKS-managed Microsoft Entra ID cluster has the following section in the response body:

articles/aks/manage-azure-rbac.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ az group create --name myResourceGroup --location westus2
3939
Create an AKS cluster with managed Microsoft Entra integration and Azure RBAC for Kubernetes Authorization using the [`az aks create`][az-aks-create] command.
4040

4141
```azurecli-interactive
42-
az aks create -g myResourceGroup -n myManagedCluster --enable-aad --enable-azure-rbac
42+
az aks create --resource-group myResourceGroup --name myManagedCluster --enable-aad --enable-azure-rbac
4343
```
4444

4545
The output will look similar to the following example output:
@@ -61,15 +61,15 @@ The output will look similar to the following example output:
6161
Add Azure RBAC for Kubernetes Authorization into an existing AKS cluster using the [`az aks update`][az-aks-update] command with the `enable-azure-rbac` flag.
6262

6363
```azurecli-interactive
64-
az aks update -g myResourceGroup -n myAKSCluster --enable-azure-rbac
64+
az aks update --resource-group myResourceGroup --name myAKSCluster --enable-azure-rbac
6565
```
6666

6767
## Disable Azure RBAC for Kubernetes Authorization from an AKS cluster
6868

6969
Remove Azure RBAC for Kubernetes Authorization from an existing AKS cluster using the [`az aks update`][az-aks-update] command with the `disable-azure-rbac` flag.
7070

7171
```azurecli-interactive
72-
az aks update -g myResourceGroup -n myAKSCluster --disable-azure-rbac
72+
az aks update --resource-group myResourceGroup --name myAKSCluster --disable-azure-rbac
7373
```
7474

7575
## Create role assignments for users to access the cluster
@@ -88,7 +88,7 @@ Roles assignments scoped to the **entire AKS cluster** can be done either on the
8888
Get your AKS resource ID using the [`az aks show`][az-aks-show] command.
8989

9090
```azurecli
91-
AKS_ID=$(az aks show -g myResourceGroup -n myManagedCluster --query id -o tsv)
91+
AKS_ID=$(az aks show --resource-group myResourceGroup --name myManagedCluster --query id -o tsv)
9292
```
9393

9494
Create a role assignment using the [`az role assignment create`][az-role-assignment-create] command. `<AAD-ENTITY-ID>` can be a username or the client ID of a service principal.
@@ -150,7 +150,7 @@ az role assignment create --role "AKS Deployment Reader" --assignee <AAD-ENTITY-
150150
Make sure you have the [Azure Kubernetes Service Cluster User](../role-based-access-control/built-in-roles.md#azure-kubernetes-service-cluster-user-role) built-in role, and then get the kubeconfig of your AKS cluster using the [`az aks get-credentials`][az-aks-get-credentials] command.
151151

152152
```azurecli-interactive
153-
az aks get-credentials -g myResourceGroup -n myManagedCluster
153+
az aks get-credentials --resource-group myResourceGroup --name myManagedCluster
154154
```
155155

156156
Now, you can use `kubectl` manage your cluster. For example, you can list the nodes in your cluster using `kubectl get nodes`. The first time you run it, you'll need to sign in, as shown in the following example:
@@ -203,13 +203,13 @@ az role assignment delete --ids <LIST OF ASSIGNMENT IDS>
203203
### Delete role definition
204204

205205
```azurecli-interactive
206-
az role definition delete -n "AKS Deployment Reader"
206+
az role definition delete --name "AKS Deployment Reader"
207207
```
208208

209209
### Delete resource group and AKS cluster
210210

211211
```azurecli-interactive
212-
az group delete -n myResourceGroup
212+
az group delete --name myResourceGroup
213213
```
214214

215215
## Next steps

articles/aks/manage-local-accounts-managed-azure-ad.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ You can disable local accounts using the parameter `disable-local-accounts`. The
3333
1. Create a new AKS cluster without any local accounts using the [`az aks create`][az-aks-create] command with the `disable-local-accounts` flag.
3434

3535
```azurecli-interactive
36-
az aks create -g <resource-group> -n <cluster-name> --enable-aad --aad-admin-group-object-ids <aad-group-id> --disable-local-accounts
36+
az aks create --resource-group <resource-group> --name <cluster-name> --enable-aad --aad-admin-group-object-ids <aad-group-id> --disable-local-accounts
3737
```
3838
3939
2. In the output, confirm local accounts are disabled by checking that the field `properties.disableLocalAccounts` is set to `true`.
@@ -63,7 +63,7 @@ You can disable local accounts using the parameter `disable-local-accounts`. The
6363
1. Disable local accounts on an existing Microsoft Entra integration enabled AKS cluster using the [`az aks update`][az-aks-update] command with the `disable-local-accounts` parameter.
6464
6565
```azurecli-interactive
66-
az aks update -g <resource-group> -n <cluster-name> --disable-local-accounts
66+
az aks update --resource-group <resource-group> --name <cluster-name> --disable-local-accounts
6767
```
6868
6969
2. In the output, confirm local accounts are disabled by checking that the field `properties.disableLocalAccounts` is set to `true`.
@@ -93,7 +93,7 @@ You can disable local accounts using the parameter `disable-local-accounts`. The
9393
1. Re-enable a disabled local account on an existing cluster using the [`az aks update`][az-aks-update] command with the `enable-local-accounts` parameter.
9494
9595
```azurecli-interactive
96-
az aks update -g <resource-group> -n <cluster-name> --enable-local-accounts
96+
az aks update --resource-group <resource-group> --name <cluster-name> --enable-local-accounts
9797
```
9898
9999
2. In the output, confirm local accounts are re-enabled by checking that the field `properties.disableLocalAccounts` is set to `false`.

articles/aks/use-azure-ad-pod-identity.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Create an AKS cluster with Azure CNI and pod-managed identity enabled. The follo
9191

9292
```azurecli-interactive
9393
az group create --name myResourceGroup --location eastus
94-
az aks create -g myResourceGroup -n myAKSCluster --enable-pod-identity --network-plugin azure
94+
az aks create --resource-group myResourceGroup --name myAKSCluster --enable-pod-identity --network-plugin azure
9595
```
9696

9797
Use [az aks get-credentials][az-aks-get-credentials] to sign in to your AKS cluster. This command also downloads and configures the `kubectl` client certificate on your development computer.
@@ -108,7 +108,7 @@ az aks get-credentials --resource-group myResourceGroup --name myAKSCluster
108108
Update an existing AKS cluster with Azure CNI to include pod-managed identity.
109109

110110
```azurecli-interactive
111-
az aks update -g $MY_RESOURCE_GROUP -n $MY_CLUSTER --enable-pod-identity
111+
az aks update --resource-group $MY_RESOURCE_GROUP --name $MY_CLUSTER --enable-pod-identity
112112
```
113113

114114
<a name='using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities'></a>
@@ -155,15 +155,15 @@ spec:
155155
Create an AKS cluster with Kubenet network plugin and pod-managed identity enabled.
156156
157157
```azurecli-interactive
158-
az aks create -g $MY_RESOURCE_GROUP -n $MY_CLUSTER --enable-pod-identity --enable-pod-identity-with-kubenet
158+
az aks create --resource-group $MY_RESOURCE_GROUP --name $MY_CLUSTER --enable-pod-identity --enable-pod-identity-with-kubenet
159159
```
160160

161161
## Update an existing AKS cluster with Kubenet network plugin
162162

163163
Update an existing AKS cluster with Kubenet network plugin to include pod-managed identity.
164164

165165
```azurecli-interactive
166-
az aks update -g $MY_RESOURCE_GROUP -n $MY_CLUSTER --enable-pod-identity --enable-pod-identity-with-kubenet
166+
az aks update --resource-group $MY_RESOURCE_GROUP --name $MY_CLUSTER --enable-pod-identity --enable-pod-identity-with-kubenet
167167
```
168168

169169
## Create an identity
@@ -178,8 +178,8 @@ az group create --name myIdentityResourceGroup --location eastus
178178
export IDENTITY_RESOURCE_GROUP="myIdentityResourceGroup"
179179
export IDENTITY_NAME="application-identity"
180180
az identity create --resource-group ${IDENTITY_RESOURCE_GROUP} --name ${IDENTITY_NAME}
181-
export IDENTITY_CLIENT_ID="$(az identity show -g ${IDENTITY_RESOURCE_GROUP} -n ${IDENTITY_NAME} --query clientId -otsv)"
182-
export IDENTITY_RESOURCE_ID="$(az identity show -g ${IDENTITY_RESOURCE_GROUP} -n ${IDENTITY_NAME} --query id -otsv)"
181+
export IDENTITY_CLIENT_ID="$(az identity show --resource-group ${IDENTITY_RESOURCE_GROUP} --name ${IDENTITY_NAME} --query clientId -o tsv)"
182+
export IDENTITY_RESOURCE_ID="$(az identity show --resource-group ${IDENTITY_RESOURCE_GROUP} --name ${IDENTITY_NAME} --query id -o tsv)"
183183
```
184184

185185
## Assign permissions for the managed identity
@@ -190,10 +190,10 @@ To run the demo, the *IDENTITY_CLIENT_ID* managed identity must have Virtual Mac
190190

191191
```azurecli-interactive
192192
# Obtain the name of the resource group containing the Virtual Machine Scale set of your AKS cluster, commonly called the node resource group
193-
NODE_GROUP=$(az aks show -g myResourceGroup -n myAKSCluster --query nodeResourceGroup -o tsv)
193+
NODE_GROUP=$(az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv)
194194
195195
# Obtain the id of the node resource group
196-
NODES_RESOURCE_ID=$(az group show -n $NODE_GROUP -o tsv --query "id")
196+
NODES_RESOURCE_ID=$(az group show --name $NODE_GROUP -o tsv --query "id")
197197
198198
# Create a role assignment granting your managed identity permissions on the node resource group
199199
az role assignment create --role "Virtual Machine Contributor" --assignee "$IDENTITY_CLIENT_ID" --scope $NODES_RESOURCE_ID
@@ -334,7 +334,7 @@ az aks pod-identity delete --name ${POD_IDENTITY_NAME} --namespace ${POD_IDENTIT
334334
```
335335

336336
```azurecli
337-
az identity delete -g ${IDENTITY_RESOURCE_GROUP} -n ${IDENTITY_NAME}
337+
az identity delete --resource-group ${IDENTITY_RESOURCE_GROUP} --name ${IDENTITY_NAME}
338338
```
339339

340340
```azurecli

articles/aks/use-azure-dedicated-hosts.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The following limitations apply when you integrate Azure Dedicated Host with Azu
3737
Not all host SKUs are available in all regions, and availability zones. You can list host availability, and any offer restrictions before you start provisioning dedicated hosts.
3838

3939
```azurecli-interactive
40-
az vm list-skus -l eastus -r hostGroups/hosts -o table
40+
az vm list-skus --location eastus --resource-type hostGroups/hosts -o table
4141
```
4242

4343
> [!NOTE]
@@ -49,7 +49,7 @@ az vm list-skus -l eastus -r hostGroups/hosts -o table
4949
Evaluate [host utilization][host-utilization-evaluate] to determine the number of allocatable VMs by size before you deploy.
5050

5151
```azurecli-interactive
52-
az vm host get-instance-view -g myDHResourceGroup --host-group MyHostGroup --name MyHost
52+
az vm host get-instance-view --resource-group myDHResourceGroup --host-group MyHostGroup --name MyHost
5353
```
5454

5555
## Add a Dedicated Host Group to an AKS cluster
@@ -76,8 +76,8 @@ In this example, we'll use [az vm host group create][az-vm-host-group-create] to
7676
```azurecli-interactive
7777
az vm host group create \
7878
--name myHostGroup \
79-
-g myDHResourceGroup \
80-
-z 1 \
79+
--resource-group myDHResourceGroup \
80+
--zone 1 \
8181
--platform-fault-domain-count 1 \
8282
--automatic-placement true
8383
```
@@ -94,7 +94,7 @@ az vm host create \
9494
--name myHost \
9595
--sku DSv3-Type1 \
9696
--platform-fault-domain 1 \
97-
-g myDHResourceGroup
97+
--resource-group myDHResourceGroup
9898
```
9999

100100
## Use a user-assigned Identity
@@ -106,7 +106,7 @@ az vm host create \
106106
First, create a Managed Identity
107107

108108
```azurecli-interactive
109-
az identity create -g <Resource Group> -n <Managed Identity name>
109+
az identity create --resource-group <Resource Group> --name <Managed Identity name>
110110
```
111111

112112
Assign Managed Identity
@@ -120,7 +120,7 @@ az role assignment create --assignee <id> --role "Contributor" --scope <Resource
120120
Create an AKS cluster, and add the Host Group you just configured.
121121

122122
```azurecli-interactive
123-
az aks create -g MyResourceGroup -n MyManagedCluster --location eastus --nodepool-name agentpool1 --node-count 1 --host-group-id <id> --node-vm-size Standard_D2s_v3 --enable-managed-identity --assign-identity <id>
123+
az aks create --resource-group MyResourceGroup --name MyManagedCluster --location eastus --nodepool-name agentpool1 --node-count 1 --host-group-id <id> --node-vm-size Standard_D2s_v3 --enable-managed-identity --assign-identity <id>
124124
```
125125

126126
## Add a Dedicated Host Node Pool to an existing AKS cluster

articles/aks/workload-identity-deploy-cluster.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export FEDERATED_IDENTITY_CREDENTIAL_NAME="myFedIdentity"
5252
Create an AKS cluster using the [az aks create][az-aks-create] command with the `--enable-oidc-issuer` parameter to use the OIDC Issuer. The following example creates a cluster named *myAKSCluster* with one node in the *myResourceGroup*:
5353

5454
```azurecli-interactive
55-
az aks create -g "${RESOURCE_GROUP}" -n myAKSCluster --enable-oidc-issuer --enable-workload-identity --generate-ssh-keys
55+
az aks create --resource-group "${RESOURCE_GROUP}" --name myAKSCluster --enable-oidc-issuer --enable-workload-identity --generate-ssh-keys
5656
```
5757

5858
After a few minutes, the command completes and returns JSON-formatted information about the cluster.
@@ -65,15 +65,15 @@ After a few minutes, the command completes and returns JSON-formatted informatio
6565
You can update an AKS cluster using the [az aks update][az aks update] command with the `--enable-oidc-issuer` and the `--enable-workload-identity` parameter to use the OIDC Issuer and enable workload identity. The following example updates a cluster named *myAKSCluster*:
6666

6767
```azurecli-interactive
68-
az aks update -g "${RESOURCE_GROUP}" -n myAKSCluster --enable-oidc-issuer --enable-workload-identity
68+
az aks update --resource-group "${RESOURCE_GROUP}" --name myAKSCluster --enable-oidc-issuer --enable-workload-identity
6969
```
7070

7171
## Retrieve the OIDC Issuer URL
7272

73-
To get the OIDC Issuer URL and save it to an environmental variable, run the following command. Replace the default value for the arguments `-n`, which is the name of the cluster:
73+
To get the OIDC Issuer URL and save it to an environmental variable, run the following command. Replace the default value for the arguments `--name`, which is the name of the cluster:
7474

7575
```bash
76-
export AKS_OIDC_ISSUER="$(az aks show -n myAKSCluster -g "${RESOURCE_GROUP}" --query "oidcIssuerProfile.issuerUrl" -o tsv)"
76+
export AKS_OIDC_ISSUER="$(az aks show --name myAKSCluster --resource-group "${RESOURCE_GROUP}" --query "oidcIssuerProfile.issuerUrl" -o tsv)"
7777
```
7878

7979
The variable should contain the Issuer URL similar to the following example:
@@ -103,7 +103,7 @@ export USER_ASSIGNED_CLIENT_ID="$(az identity show --resource-group "${RESOURCE_
103103
Create a Kubernetes service account and annotate it with the client ID of the managed identity created in the previous step. Use the [az aks get-credentials][az-aks-get-credentials] command and replace the values for the cluster name and the resource group name.
104104

105105
```azurecli-interactive
106-
az aks get-credentials -n myAKSCluster -g "${RESOURCE_GROUP}"
106+
az aks get-credentials --name myAKSCluster --resource-group "${RESOURCE_GROUP}"
107107
```
108108

109109
Copy and paste the following multi-line input in the Azure CLI.
@@ -195,7 +195,7 @@ You can retrieve this information using the Azure CLI command: [az keyvault list
195195
196196
3. Export Key Vault URL:
197197
```azurecli-interactive
198-
export KEYVAULT_URL="$(az keyvault show -g ${KEYVAULT_RESOURCE_GROUP} -n ${KEYVAULT_NAME} --query properties.vaultUri -o tsv)"
198+
export KEYVAULT_URL="$(az keyvault show --resource-group ${KEYVAULT_RESOURCE_GROUP} --name ${KEYVAULT_NAME} --query properties.vaultUri -o tsv)"
199199
```
200200
201201
4. Deploy a pod that references the service account and Key Vault URL above:

articles/aks/workload-identity-migrate-from-pod-identity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ If you don't have a managed identity created and assigned to your pod, perform t
8080
3. To get the OIDC Issuer URL and save it to an environmental variable, run the following command. Replace the default values for the cluster name and the resource group name.
8181
8282
```bash
83-
export AKS_OIDC_ISSUER="$(az aks show -n myAKSCluster -g myResourceGroup --query "oidcIssuerProfile.issuerUrl" -otsv)"
83+
export AKS_OIDC_ISSUER="$(az aks show --name myAKSCluster --resource-group myResourceGroup --query "oidcIssuerProfile.issuerUrl" -o tsv)"
8484
```
8585
8686
The variable should contain the Issuer URL similar to the following example:
@@ -96,7 +96,7 @@ If you don't have a managed identity created and assigned to your pod, perform t
9696
If you don't have a dedicated Kubernetes service account created for this application, perform the following steps to create and then annotate it with the client ID of the managed identity created in the previous step. Use the [az aks get-credentials][az-aks-get-credentials] command and replace the values for the cluster name and the resource group name.
9797
9898
```azurecli-interactive
99-
az aks get-credentials -n myAKSCluster -g "${RESOURCE_GROUP}"
99+
az aks get-credentials --name myAKSCluster --resource-group "${RESOURCE_GROUP}"
100100
```
101101

102102
Copy and paste the following multi-line input in the Azure CLI.

0 commit comments

Comments
 (0)