Skip to content

Commit f2840f4

Browse files
committed
add --generate-ssh-keys to az aks create calls
1 parent d6d276c commit f2840f4

File tree

61 files changed

+468
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+468
-158
lines changed

articles/aks/azure-cni-overlay.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ The following attributes are provided to support dual-stack clusters:
250250
--network-plugin-mode overlay \
251251
--ip-families ipv4,ipv6 \
252252
--generate-ssh-keys
253-
```
253+
```
254254
255255
---
256256

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

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,15 @@ 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 --name <clusterName> --resource-group <resourceGroupName> --location <location> \
77-
--network-plugin azure \
78-
--network-plugin-mode overlay \
79-
--pod-cidr 192.168.0.0/16 \
80-
--network-dataplane cilium
76+
az aks create \
77+
--name <clusterName> \
78+
--resource-group <resourceGroupName> \
79+
--location <location> \
80+
--network-plugin azure \
81+
--network-plugin-mode overlay \
82+
--pod-cidr 192.168.0.0/16 \
83+
--network-dataplane cilium \
84+
--generate-ssh-keys
8185
```
8286

8387
> [!NOTE]
@@ -102,12 +106,16 @@ az network vnet subnet create --resource-group <resourceGroupName> --vnet-name <
102106
Create the cluster using `--network-dataplane cilium`:
103107

104108
```azurecli-interactive
105-
az aks create --name <clusterName> --resource-group <resourceGroupName> --location <location> \
106-
--max-pods 250 \
107-
--network-plugin azure \
108-
--vnet-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/nodesubnet \
109-
--pod-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/podsubnet \
110-
--network-dataplane cilium
109+
az aks create \
110+
--name <clusterName> \
111+
--resource-group <resourceGroupName> \
112+
--location <location> \
113+
--max-pods 250 \
114+
--network-plugin azure \
115+
--vnet-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/nodesubnet \
116+
--pod-subnet-id /subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/podsubnet \
117+
--network-dataplane cilium \
118+
--generate-ssh-keys
111119
```
112120

113121
## Upgrade an existing cluster to Azure CNI Powered by Cilium

articles/aks/azure-hybrid-benefit.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ PASSWORD='tempPassword1234$'
3030
RG_NAME='myResourceGroup'
3131
CLUSTER='myAKSCluster'
3232
33-
az aks create --resource-group $RG_NAME --name $CLUSTER --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password $PASSWORD --enable-ahub
33+
az aks create \
34+
--resource-group $RG_NAME \
35+
--name $CLUSTER \
36+
--load-balancer-sku Standard \
37+
--network-plugin azure \
38+
--windows-admin-username azure \
39+
--windows-admin-password $PASSWORD \
40+
--enable-ahub \
41+
--generate-ssh-keys
3442
```
3543

3644
To enable Azure Hybrid Benefit on an existing AKS cluster:

articles/aks/best-practices-app-cluster-reliability.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,16 @@ To keep up with application demands in AKS, you might need to adjust the number
348348
You can use the `--enable-cluster-autoscaler` parameter when creating an AKS cluster to enable the cluster autoscaler, as shown in the following example:
349349

350350
```azurecli-interactive
351-
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 2 --vm-set-type VirtualMachineScaleSets --load-balancer-sku standard --enable-cluster-autoscaler --min-count 1 --max-count 3
351+
az aks create \
352+
--resource-group myResourceGroup \
353+
--name myAKSCluster \
354+
--node-count 2 \
355+
--vm-set-type VirtualMachineScaleSets \
356+
--load-balancer-sku standard \
357+
--enable-cluster-autoscaler \
358+
--min-count 1 \
359+
--max-count 3 \
360+
--generate-ssh-keys
352361
```
353362

354363
You can also enable the cluster autoscaler on an existing node pool and configure more granular details of the cluster autoscaler by changing the default values in the cluster-wide autoscaler profile.

articles/aks/cluster-autoscaler.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ This article requires Azure CLI version 2.0.76 or later. Run `az --version` to f
4343
--load-balancer-sku standard \
4444
--enable-cluster-autoscaler \
4545
--min-count 1 \
46-
--max-count 3
46+
--max-count 3 \
47+
--generate-ssh-keys
4748
```
4849
4950
It takes a few minutes to create the cluster and configure the cluster autoscaler settings.
@@ -178,13 +179,14 @@ The following table lists the available settings for the cluster autoscaler prof
178179
179180
```azurecli-interactive
180181
az aks create \
181-
--resource-group myResourceGroup \
182-
--name myAKSCluster \
183-
--node-count 1 \
184-
--enable-cluster-autoscaler \
185-
--min-count 1 \
186-
--max-count 3 \
187-
--cluster-autoscaler-profile scan-interval=30s
182+
--resource-group myResourceGroup \
183+
--name myAKSCluster \
184+
--node-count 1 \
185+
--enable-cluster-autoscaler \
186+
--min-count 1 \
187+
--max-count 3 \
188+
--cluster-autoscaler-profile scan-interval=30s \
189+
--generate-ssh-keys
188190
```
189191
190192
### Set the cluster autoscaler profile on an existing cluster

articles/aks/concepts-clusters-workloads.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ When you create an AKS cluster, you specify an Azure resource group to create th
233233
The node resource group is assigned a name by default with the following format: *MC_resourceGroupName_clusterName_location*. During cluster creation, you can specify the name assigned to your node resource group. When using an Azure Resource Manager template, you can define the name using the `nodeResourceGroup` property. When using Azure CLI, you use the `--node-resource-group` parameter with the `az aks create` command, as shown in the following example:
234234

235235
```azurecli-interactive
236-
az aks create --name myAKSCluster --resource-group myResourceGroup --node-resource-group myNodeResourceGroup
236+
az aks create \
237+
--name myAKSCluster \
238+
--resource-group myResourceGroup \
239+
--node-resource-group myNodeResourceGroup \
240+
--generate-ssh-keys
237241
```
238242

239243
When you delete your AKS cluster, the AKS resource provider automatically deletes the node resource group.

articles/aks/configure-azure-cni-dynamic-ip-allocation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,17 @@ Create the cluster, referencing the node subnet using `--vnet-subnet-id` and the
9494
CLUSTER_NAME="myAKSCluster"
9595
SUBSCRIPTION="aaaaaaa-aaaaa-aaaaaa-aaaa"
9696
97-
az aks create --name $CLUSTER_NAME --resource-group $RESOURCE_GROUP_NAME --location $LOCATION \
97+
az aks create \
98+
--name $CLUSTER_NAME \
99+
--resource-group $RESOURCE_GROUP_NAME \
100+
--location $LOCATION \
98101
--max-pods 250 \
99102
--node-count 2 \
100103
--network-plugin azure \
101104
--vnet-subnet-id /subscriptions/$SUBSCRIPTION/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Network/virtualNetworks/$VNET_NAME/subnets/$SUBNET_NAME_1 \
102105
--pod-subnet-id /subscriptions/$SUBSCRIPTION/resourceGroups/$RESOURCE_GROUP_NAME/providers/Microsoft.Network/virtualNetworks/$VNET_NAME/subnets/$SUBNET_NAME_2 \
103-
--enable-addons monitoring
106+
--enable-addons monitoring \
107+
--generate-ssh-keys
104108
```
105109

106110
### Adding node pool

articles/aks/configure-azure-cni-static-block-allocation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,19 @@ Create the cluster, referencing the node subnet using `--vnet-subnet-id`, the po
160160
clusterName="myAKSCluster"
161161
subscription="aaaaaaa-aaaaa-aaaaaa-aaaa"
162162
163-
az aks create --name $clusterName --resource-group $resourceGroup --location $location \
163+
az aks create \
164+
--name $clusterName \
165+
--resource-group $resourceGroup \
166+
--location $location \
164167
--max-pods 250 \
165168
--node-count 2 \
166169
--network-plugin azure \
167170
--pod-ip-allocation-mode StaticBlock \
168171
--vnet-subnet-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Network/virtualNetworks/$vnet/subnets/nodesubnet \
169172
--pod-subnet-id /subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Network/virtualNetworks/$vnet/subnets/podsubnet \
170173
--enable-addons monitoring \
171-
--kubernetes-version 1.28
174+
--kubernetes-version 1.28 \
175+
--generate-ssh-keys
172176
```
173177

174178
### Adding node pool

articles/aks/configure-kube-proxy.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,17 @@ You can view the full `kube-proxy` configuration structure in the [AKS Cluster S
110110
111111
```azurecli-interactive
112112
# Create a new cluster
113-
az aks create --resource-group <resourceGroup> --name <clusterName> --kube-proxy-config kube-proxy.json
113+
az aks create \
114+
--resource-group <resourceGroup> \
115+
--name <clusterName> \
116+
--kube-proxy-config kube-proxy.json \
117+
--generate-ssh-keys
114118
115119
# Update an existing cluster
116-
az aks update --resource-group <resourceGroup> --name <clusterName> --kube-proxy-config kube-proxy.json
120+
az aks update \
121+
--resource-group <resourceGroup> \
122+
--name <clusterName> \
123+
--kube-proxy-config kube-proxy.json
117124
```
118125
119126
## Next steps

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ The following attributes are provided to support dual-stack clusters:
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 --location <region> --resource-group <resourceGroupName> --name <clusterName> --ip-families ipv4,ipv6
80+
az aks create \
81+
--location <region> \
82+
--resource-group <resourceGroupName> \
83+
--name <clusterName> \
84+
--ip-families ipv4,ipv6 \
85+
--generate-ssh-keys
8186
```
8287
8388
3. Once the cluster is created, get the cluster admin credentials using the [`az aks get-credentials`][az-aks-get-credentials] command.

0 commit comments

Comments
 (0)