-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy path_help.py
More file actions
4563 lines (4402 loc) · 261 KB
/
_help.py
File metadata and controls
4563 lines (4402 loc) · 261 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
# pylint: disable=too-many-lines
import os.path
from knack.help_files import helps
ACS_SERVICE_PRINCIPAL_CACHE = os.path.join(
'$HOME', '.azure', 'acsServicePrincipal.json')
AKS_SERVICE_PRINCIPAL_CACHE = os.path.join(
'$HOME', '.azure', 'aksServicePrincipal.json')
# AKS command help
helps['aks create'] = f"""
type: command
short-summary: Create a new managed Kubernetes cluster.
parameters:
- name: --generate-ssh-keys
type: string
short-summary: Generate SSH public and private key files if missing.
- name: --service-principal
type: string
short-summary: Service principal used for authentication to Azure APIs.
long-summary: If not specified, a new service principal is created and cached at
{AKS_SERVICE_PRINCIPAL_CACHE} to be used by subsequent `az aks` commands.
- name: --skip-subnet-role-assignment
type: bool
short-summary: Skip role assignment for subnet (advanced networking).
long-summary: If specified, please make sure your service principal has the access to your subnet.
- name: --zones -z
type: string array
short-summary: Space-separated list of availability zones where agent nodes will be placed.
- name: --client-secret
type: string
short-summary: Secret associated with the service principal. This argument is required if
`--service-principal` is specified.
- name: --node-vm-size -s
type: string
short-summary: Size of Virtual Machines to create as Kubernetes nodes. If the user does not specify one, server will select a default VM size for her/him.
- name: --dns-name-prefix -p
type: string
short-summary: Prefix for hostnames that are created. If not specified, generate a hostname using the
managed cluster and resource group names.
- name: --node-count -c
type: int
short-summary: Number of nodes in the Kubernetes node pool. It is required when --enable-cluster-autoscaler specified. After creating a cluster, you can change the
size of its node pool with `az aks scale`.
- name: --node-osdisk-size
type: int
short-summary: Size in GiB of the OS disk for each node in the node pool. Minimum 30 GiB.
- name: --node-osdisk-type
type: string
short-summary: OS disk type to be used for machines in a given agent pool. Defaults to 'Ephemeral' when possible in conjunction with VM size and OS disk size. May not be changed for this pool after creation. ('Ephemeral' or 'Managed')
- name: --node-osdisk-diskencryptionset-id -d
type: string
short-summary: ResourceId of the disk encryption set to use for enabling encryption at rest on agent node os disk.
- name: --kubernetes-version -k
type: string
short-summary: Version of Kubernetes to use for creating the cluster, such as "1.7.12" or "1.8.7".
populator-commands:
- "`az aks get-versions`"
- name: --ssh-key-value
type: string
short-summary: Public key path or key contents to install on node VMs for SSH access. For example,
'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'.
- name: --admin-username -u
type: string
short-summary: User account to create on node VMs for SSH access.
- name: --windows-admin-username
type: string
short-summary: User account to create on windows node VMs.
long-summary: |-
Rules for windows-admin-username:
- restriction: Cannot end in "."
- Disallowed values: "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
- Minimum-length: 1 character
- Max-length: 20 characters
Reference: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.compute.models.virtualmachinescalesetosprofile.adminusername?view=azure-dotnet
- name: --windows-admin-password
type: string
short-summary: User account password to use on windows node VMs.
long-summary: |-
Rules for windows-admin-password:
- Minimum-length: 14 characters
- Max-length: 123 characters
- Complexity requirements: 3 out of 4 conditions below need to be fulfilled
* Has lower characters
* Has upper characters
* Has a digit
* Has a special character (Regex match [\\W_])
- Disallowed values: "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
Reference: https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.management.compute.models.virtualmachinescalesetosprofile.adminpassword?view=azure-dotnet
- name: --enable-ahub
type: bool
short-summary: Enable Azure Hybrid User Benefits (AHUB) for Windows VMs.
- name: --enable-aad
type: bool
short-summary: Enable managed AAD feature for cluster.
- name: --enable-azure-rbac
type: bool
short-summary: Enable Azure RBAC to control authorization checks on cluster.
- name: --aad-admin-group-object-ids
type: string
short-summary: Comma-separated list of aad group object IDs that will be set as cluster admin.
- name: --aad-tenant-id
type: string
short-summary: The ID of an Azure Active Directory tenant.
- name: --dns-service-ip
type: string
short-summary: An IP address assigned to the Kubernetes DNS service.
long-summary: This address must be within the Kubernetes service address range specified by "--service-cidr".
For example, 10.0.0.10.
- name: --docker-bridge-address
type: string
short-summary: A specific IP address and netmask for the Docker bridge, using standard CIDR notation.
long-summary: This address must not be in any Subnet IP ranges, or the Kubernetes service address range.
For example, 172.17.0.1/16.
- name: --load-balancer-sku
type: string
short-summary: Azure Load Balancer SKU selection for your cluster. basic or standard.
long-summary: Select between Basic or Standard Azure Load Balancer SKU for your AKS cluster.
- name: --load-balancer-managed-outbound-ip-count
type: int
short-summary: Load balancer managed outbound IP count.
long-summary: Desired number of managed outbound IPs for load balancer outbound connection. Valid for Standard SKU load balancer cluster only.
- name: --load-balancer-managed-outbound-ipv6-count
type: int
short-summary: Load balancer managed outbound IPv6 IP count.
long-summary: Desired number of managed outbound IPv6 IPs for load balancer outbound connection. Valid for dual-stack (--ip-families IPv4,IPv6) only.
- name: --load-balancer-outbound-ips
type: string
short-summary: Load balancer outbound IP resource IDs.
long-summary: Comma-separated public IP resource IDs for load balancer outbound connection. Valid for Standard SKU load balancer cluster only.
- name: --load-balancer-outbound-ip-prefixes
type: string
short-summary: Load balancer outbound IP prefix resource IDs.
long-summary: Comma-separated public IP prefix resource IDs for load balancer outbound connection. Valid for Standard SKU load balancer cluster only.
- name: --load-balancer-outbound-ports
type: int
short-summary: Load balancer outbound allocated ports.
long-summary: Desired static number of outbound ports per VM in the load balancer backend pool. By default, set to 0 which uses the default allocation based on the number of VMs. Please specify a value in the range of [0, 64000] that is a multiple of 8.
- name: --load-balancer-idle-timeout
type: int
short-summary: Load balancer idle timeout in minutes.
long-summary: Desired idle timeout for load balancer outbound flows, default is 30 minutes. Please specify a value in the range of [4, 100].
- name: --load-balancer-backend-pool-type
type: string
short-summary: Load balancer backend pool type.
long-summary: Load balancer backend pool type, supported values are nodeIP and nodeIPConfiguration.
- name: --cluster-service-load-balancer-health-probe-mode
type: string
short-summary: Set the cluster service health probe mode.
long-summary: Set the cluster service health probe mode. Default is "Servicenodeport".
- name: --nat-gateway-managed-outbound-ip-count
type: int
short-summary: NAT gateway managed outbound IP count.
long-summary: Desired number of managed outbound IPs for NAT gateway outbound connection. Please specify a value in the range of [1, 16]. Valid for Standard SKU load balancer cluster with managedNATGateway or managedNATGatewayV2 outbound type only.
- name: --nat-gateway-idle-timeout
type: int
short-summary: NAT gateway idle timeout in minutes.
long-summary: Desired idle timeout for NAT gateway outbound flows, default is 4 minutes. Please specify a value in the range of [4, 120]. Valid for Standard SKU load balancer cluster with managedNATGateway or managedNATGatewayV2 outbound type only.
- name: --outbound-type
type: string
short-summary: How outbound traffic will be configured for a cluster.
long-summary: Select between loadBalancer, userDefinedRouting, managedNATGateway, managedNATGatewayV2, userAssignedNATGateway, none and block. If not set, defaults to type loadBalancer. managedNATGatewayV2 uses Azure NAT Gateway Standard V2 SKU and supports IPv6, user-provided public IPs, and user-provided IP prefixes.
- name: --enable-addons -a
type: string
short-summary: Enable the Kubernetes addons in a comma-separated list.
long-summary: |-
These addons are available:
- monitoring : turn on Log Analytics monitoring. Uses the Log Analytics Default Workspace if it exists, else creates one. Specify "--workspace-resource-id" to use an existing workspace. If monitoring addon is enabled --no-wait argument will have no effect
- virtual-node : enable AKS Virtual Node. Requires --aci-subnet-name to provide the name of an existing subnet for the Virtual Node to use. aci-subnet-name must be in the same vnet which is specified by --vnet-subnet-id (required as well).
- azure-policy : enable Azure policy. The Azure Policy add-on for AKS enables at-scale enforcements and safeguards on your clusters in a centralized, consistent manner. Required if enabling deployment safeguards. Learn more at aka.ms/aks/policy.
- application-load-balancer : enable the Application Load Balancer (Application Gateway for Containers) addon (PREVIEW).
- ingress-appgw : enable Application Gateway Ingress Controller addon.
- confcom : enable confcom addon, this will enable SGX device plugin by default(PREVIEW).
- open-service-mesh : enable Open Service Mesh addon (PREVIEW).
- gitops : enable GitOps (PREVIEW).
- azure-keyvault-secrets-provider : enable Azure Keyvault Secrets Provider addon.
- web_application_routing : enable the App Routing addon (PREVIEW). Specify "--dns-zone-resource-id" to configure DNS.
- name: --enable-azure-monitor-logs
type: bool
short-summary: Enable Azure Monitor logs for the cluster.
long-summary: This is equivalent to using "--enable-addons monitoring". Turn on Log Analytics monitoring. Uses the Log Analytics Default Workspace if it exists, else creates one. Specify "--workspace-resource-id" to use an existing workspace. If monitoring addon is enabled --no-wait argument will have no effect
- name: --disable-rbac
type: bool
short-summary: Disable Kubernetes Role-Based Access Control.
- name: --max-pods -m
type: int
short-summary: The maximum number of pods deployable to a node.
long-summary: If not specified, defaults based on network-plugin. 30 for "azure", 110 for "kubenet", or 250 for "none".
- name: --network-plugin
type: string
short-summary: The Kubernetes network plugin to use.
long-summary: Specify "azure" for routable pod IPs from VNET, "kubenet" for non-routable pod IPs with an overlay network, or "none" for no networking configured.
- name: --network-plugin-mode
type: string
short-summary: The network plugin mode to use.
long-summary: |
Used to control the mode the network plugin should operate in. For example, "overlay" used with
--network-plugin=azure will use an overlay network (non-VNET IPs) for pods in the cluster.
- name: --network-policy
type: string
short-summary: (PREVIEW) The Kubernetes network policy to use.
long-summary: |
Using together with "azure" network plugin.
Specify "azure" for Azure network policy manager, "calico" for calico network policy controller, "cilium" for Azure CNI Overlay powered by Cilium.
Defaults to "" (network policy disabled).
- name: --network-dataplane
type: string
short-summary: The network dataplane to use.
long-summary: |
Network dataplane used in the Kubernetes cluster.
Specify "azure" to use the Azure dataplane (default) or "cilium" to enable Cilium dataplane.
- name: --enable-cilium-dataplane
type: bool
short-summary: Use Cilium as the networking dataplane for the Kubernetes cluster.
long-summary: |
Used together with the "azure" network plugin.
Requires either --pod-subnet-id or --network-plugin-mode=overlay.
This flag is deprecated in favor of --network-dataplane=cilium.
- name: --enable-acns
type: bool
short-summary: Enable advanced network functionalities on a cluster. Enabling this will incur additional costs. For non-cilium clusters, acns security will be disabled by default until further notice.
- name: --disable-acns-observability
type: bool
short-summary: Used to disable advanced networking observability features on a clusters when enabling advanced networking features with "--enable-acns".
- name: --disable-acns-security
type: bool
short-summary: Used to disable advanced networking security features on a clusters when enabling advanced networking features with "--enable-acns".
- name: --acns-advanced-networkpolicies
type: string
short-summary: Used to enable advanced network policies (None, FQDN or L7) on a cluster when enabling advanced networking features with "--enable-acns".
- name: --acns-datapath-acceleration-mode
type: string
short-summary: Used to set the acceleration mode (None or BpfVeth) on a cluster when enabling advanced networking features with "--enable-acns".
- name: --enable-retina-flow-logs
type: bool
short-summary: Enable advanced network flow log collection functionalities on a cluster. This flag is deprecated in favor of --enable-container-network-logs.
- name: --enable-container-network-logs
type: bool
short-summary: Enable container network log collection functionalities on a cluster. Automatically enables --enable-high-log-scale-mode.
- name: --no-ssh-key -x
type: string
short-summary: Do not use or create a local SSH key.
long-summary: To access nodes after creating a cluster with this option, use the Azure Portal.
- name: --pod-cidr
type: string
short-summary: A CIDR notation IP range from which to assign pod IPs when Azure CNI Overlay or Kubenet is used (On 31 March 2028, Kubenet will be retired).
long-summary: This range must not overlap with any Subnet IP ranges. For example, 172.244.0.0/16. See https://aka.ms/aks/azure-cni-overlay.
- name: --service-cidr
type: string
short-summary: A CIDR notation IP range from which to assign service cluster IPs.
long-summary: This range must not overlap with any Subnet IP ranges. For example, 10.0.0.0/16.
- name: --service-cidrs
type: string
short-summary: A comma separated list of CIDR notation IP ranges from which to assign service cluster IPs.
long-summary: Each range must not overlap with any Subnet IP ranges. For example, 10.0.0.0/16.
- name: --pod-cidrs
type: string
short-summary: A comma-separated list of CIDR notation IP ranges from which to assign pod IPs when Azure CNI Overlay or Kubenet is used (On 31 March 2028, Kubenet will be retired).
long-summary: Each range must not overlap with any Subnet IP ranges. For example, 172.244.0.0/16. See https://aka.ms/aks/azure-cni-overlay.
- name: --ip-families
type: string
short-summary: A comma separated list of IP versions to use for cluster networking.
long-summary: Each IP version should be in the format IPvN. For example, IPv4.
- name: --vnet-subnet-id
type: string
short-summary: The ID of a subnet in an existing VNet into which to deploy the cluster.
- name: --pod-subnet-id
type: string
short-summary: The ID of a subnet in an existing VNet into which to assign pods in the cluster (requires azure network-plugin)
- name: --ppg
type: string
short-summary: The ID of a PPG.
- name: --os-sku
type: string
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
- name: --enable-fips-image
type: bool
short-summary: Use FIPS-enabled OS on agent nodes.
- name: --workspace-resource-id
type: string
short-summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. If not specified, uses the default Log Analytics Workspace if it exists, otherwise creates one.
- name: --enable-msi-auth-for-monitoring
type: bool
short-summary: Send monitoring data to Log Analytics using the cluster's assigned identity (instead of the Log Analytics Workspace's shared key).
- name: --enable-syslog
type: bool
short-summary: Enable syslog data collection for Monitoring addon
- name: --data-collection-settings
type: string
short-summary: Path to JSON file containing data collection settings for Monitoring addon.
- name: --enable-high-log-scale-mode
type: bool
short-summary: Enable High Log Scale Mode for Container Logs. Auto-enabled when --enable-container-network-logs is specified.
- name: --ampls-resource-id
type: string
short-summary: Resource ID of Azure Monitor Private Link scope for Monitoring Addon.
- name: --enable-cluster-autoscaler
type: bool
short-summary: Enable cluster autoscaler, default value is false.
long-summary: If specified, please make sure the kubernetes version is larger than 1.10.6.
- name: --min-count
type: int
short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 1000].
- name: --max-count
type: int
short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 1000].
- name: --vm-set-type
type: string
short-summary: Agent pool vm set type. VirtualMachineScaleSets, AvailabilitySet or VirtualMachines(Preview).
- name: --node-resource-group
type: string
short-summary: The node resource group is the resource group where all customer's resources will be created in, such as virtual machines.
- name: --k8s-support-plan
type: string
short-summary: Choose from "KubernetesOfficial" or "AKSLongTermSupport", with "AKSLongTermSupport" you get 1 extra year of CVE patchs.
- name: --nrg-lockdown-restriction-level
type: string
short-summary: Restriction level on the managed node resource group.
long-summary: The restriction level of permissions allowed on the cluster's managed node resource group, supported values are Unrestricted, and ReadOnly (recommended ReadOnly).
- name: --sku
type: string
short-summary: Specify SKU name for managed clusters. '--sku base' enables a base managed cluster. '--sku automatic' enables an automatic managed cluster.
- name: --tier
type: string
short-summary: Specify SKU tier for managed clusters. '--tier standard' enables a standard managed cluster service with a financially backed SLA. '--tier free' does not have a financially backed SLA.
- name: --attach-acr
type: string
short-summary: Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.
- name: --enable-apiserver-vnet-integration
type: bool
short-summary: Enable integration of user vnet with control plane apiserver pods.
- name: --apiserver-subnet-id
type: string
short-summary: The ID of a subnet in an existing VNet into which to assign control plane apiserver pods(requires --enable-apiserver-vnet-integration)
- name: --enable-private-cluster
type: string
short-summary: Enable private cluster.
- name: --private-dns-zone
type: string
short-summary: Private dns zone mode for private cluster. "none" mode is in preview.
long-summary: Allowed values are "system", "none" (Preview) or your custom private dns zone resource id. If not set, defaults to type system. Requires --enable-private-cluster to be used.
- name: --fqdn-subdomain
type: string
short-summary: Prefix for FQDN that is created for private cluster with custom private dns zone scenario.
- name: --disable-public-fqdn
type: bool
short-summary: Disable public fqdn feature for private cluster.
- name: --enable-node-public-ip
type: bool
short-summary: Enable VMSS node public IP.
- name: --node-public-ip-prefix-id
type: string
short-summary: Public IP prefix ID used to assign public IPs to VMSS nodes.
- name: --enable-managed-identity
type: bool
short-summary: Using managed identity to manage cluster resource group. You can explicitly specify "--service-principal" and "--client-secret" to disable managed identity, otherwise it will be enabled.
- name: --assign-identity
type: string
short-summary: Specify an existing user assigned identity to manage cluster resource group.
- name: --assign-kubelet-identity
type: string
short-summary: Specify an existing user assigned identity for kubelet's usage, which is typically used to pull image from ACR.
- name: --api-server-authorized-ip-ranges
type: string
short-summary: Comma-separated list of authorized apiserver IP ranges. Set to 0.0.0.0/32 to restrict apiserver traffic to node pools.
- name: --aks-custom-headers
type: string
short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2
- name: --appgw-name
type: string
short-summary: Name of the application gateway to create/use in the node resource group. Use with ingress-azure addon.
- name: --appgw-subnet-cidr
type: string
short-summary: Subnet CIDR to use for a new subnet created to deploy the Application Gateway. Use with ingress-azure addon.
- name: --appgw-id
type: string
short-summary: Resource Id of an existing Application Gateway to use with AGIC. Use with ingress-azure addon.
- name: --appgw-subnet-id
type: string
short-summary: Resource Id of an existing Subnet used to deploy the Application Gateway. Use with ingress-azure addon.
- name: --appgw-watch-namespace
type: string
short-summary: Specify the namespace, which AGIC should watch. This could be a single string value, or a comma-separated list of namespaces.
- name: --enable-sgxquotehelper
type: bool
short-summary: Enable SGX quote helper for confcom addon.
- name: --auto-upgrade-channel
type: string
short-summary: Specify the upgrade channel for autoupgrade. It could be rapid, stable, patch, node-image or none, none means disable autoupgrade.
- name: --node-os-upgrade-channel
type: string
short-summary: Manner in which the OS on your nodes is updated. It could be NodeImage, None, SecurityPatch or Unmanaged.
- name: --kubelet-config
type: string
short-summary: Kubelet configurations for agent nodes.
- name: --linux-os-config
type: string
short-summary: OS configurations for Linux agent nodes.
- name: --http-proxy-config
type: string
short-summary: Http Proxy configuration for this cluster.
- name: --kube-proxy-config
type: string
short-summary: kube-proxy configuration for this cluster.
- name: --enable-pod-identity
type: bool
short-summary: (PREVIEW) Enable pod identity addon.
- name: --enable-pod-identity-with-kubenet
type: bool
short-summary: (PREVIEW) Enable pod identity addon for cluster using Kubnet network plugin.
- name: --enable-workload-identity
type: bool
short-summary: (PREVIEW) Enable workload identity addon.
- name: --disable-disk-driver
type: bool
short-summary: Disable AzureDisk CSI Driver.
- name: --disk-driver-version
type: string
short-summary: Specify AzureDisk CSI Driver version.
- name: --disable-file-driver
type: bool
short-summary: Disable AzureFile CSI Driver.
- name: --disable-snapshot-controller
type: bool
short-summary: Disable CSI Snapshot Controller.
- name: --enable-blob-driver
type: bool
short-summary: Enable AzureBlob CSI Driver.
- name: --aci-subnet-name
type: string
short-summary: The name of a subnet in an existing VNet into which to deploy the virtual nodes.
- name: --tags
type: string
short-summary: The tags of the managed cluster. The managed cluster instance and all resources managed by the cloud provider will be tagged.
- name: --enable-encryption-at-host
type: bool
short-summary: Enable EncryptionAtHost on agent node pool.
- name: --enable-ultra-ssd
type: bool
short-summary: Enable UltraSSD on agent node pool.
- name: --enable-secret-rotation
type: bool
short-summary: Enable secret rotation. Use with azure-keyvault-secrets-provider addon.
- name: --rotation-poll-interval
type: string
short-summary: Set interval of rotation poll. Use with azure-keyvault-secrets-provider addon.
- name: --disable-local-accounts
type: bool
short-summary: (Preview) If set to true, getting static credential will be disabled for this cluster.
- name: --workload-runtime
type: string
short-summary: Determines the type of workload a node can run. Defaults to OCIContainer.
- name: --gpu-instance-profile
type: string
short-summary: GPU instance profile to partition multi-gpu Nvidia GPUs.
- name: --enable-windows-gmsa
type: bool
short-summary: Enable Windows gmsa.
- name: --gmsa-dns-server
type: string
short-summary: Specify DNS server for Windows gmsa for this cluster.
long-summary: |-
You do not need to set this if you have set DNS server in the VNET used by the cluster.
You must set or not set --gmsa-dns-server and --gmsa-root-domain-name at the same time when setting --enable-windows-gmsa.
- name: --gmsa-root-domain-name
type: string
short-summary: Specify root domain name for Windows gmsa for this cluster.
long-summary: |-
You do not need to set this if you have set DNS server in the VNET used by the cluster.
You must set or not set --gmsa-dns-server and --gmsa-root-domain-name at the same time when setting --enable-windows-gmsa.
- name: --snapshot-id
type: string
short-summary: The source nodepool snapshot id used to create this cluster.
- name: --cluster-snapshot-id
type: string
short-summary: The source cluster snapshot id is used to create new cluster.
- name: --enable-oidc-issuer
type: bool
short-summary: Enable OIDC issuer.
- name: --crg-id
type: string
short-summary: The crg-id used to associate the new cluster with the existed Capacity Reservation Group resource.
- name: --host-group-id
type: string
short-summary: (PREVIEW) The fully qualified dedicated host group id used to provision agent node pool.
- name: --message-of-the-day
type: string
short-summary: Path to a file containing the desired message of the day. Only valid for linux nodes. Will be written to /etc/motd.
- name: --enable-azure-keyvault-kms
type: bool
short-summary: Enable Azure KeyVault Key Management Service.
- name: --azure-keyvault-kms-key-id
type: string
short-summary: Identifier of Azure Key Vault key.
- name: --azure-keyvault-kms-key-vault-network-access
type: string
short-summary: Network Access of Azure Key Vault.
long-summary: Allowed values are "Public", "Private". If not set, defaults to type "Public". Requires --azure-keyvault-kms-key-id to be used.
- name: --azure-keyvault-kms-key-vault-resource-id
type: string
short-summary: Resource ID of Azure Key Vault.
- name: --kms-infrastructure-encryption
type: string
short-summary: Enable encryption at rest of Kubernetes resource objects using service-managed keys.
long-summary: Enable infrastructure encryption for Kubernetes resource objects. This feature provides encryption at rest for cluster secrets and configuration using service-managed keys. For more information see https://aka.ms/aks/kubernetesResourceObjectEncryption.
- name: --enable-image-cleaner
type: bool
short-summary: Enable ImageCleaner Service.
- name: --image-cleaner-interval-hours
type: int
short-summary: ImageCleaner scanning interval.
- name: --enable-image-integrity
type: bool
short-summary: Enable ImageIntegrity Service.
- name: --enable-service-account-image-pull
type: bool
short-summary: Enable service account based image pull. For more information, see https://aka.ms/aks/identity-binding/acr-image-pull/docs.
- name: --service-account-image-pull-default-managed-identity-id
type: string
short-summary: The default managed identity resource ID used for image pulls at the cluster level.
- name: --dns-zone-resource-id
type: string
short-summary: The resource ID of the DNS zone resource to use with the App Routing addon.
- name: --dns-zone-resource-ids
type: string
short-summary: A comma separated list of resource IDs of the DNS zone resource to use with the App Routing addon.
- name: --ca-certs --custom-ca-trust-certificates
type: string
short-summary: Path to a file containing up to 10 blank line separated certificates. Only valid for linux nodes.
long-summary: These certificates are used by Custom CA Trust features and will be added to trust stores of nodes.
- name: --enable-keda
type: bool
short-summary: Enable KEDA workload auto-scaler.
- name: --disable-run-command
type: bool
short-summary: Disable Run command feature for the cluster.
- name: --enable-defender
type: bool
short-summary: Enable Microsoft Defender security profile.
- name: --defender-config
type: string
short-summary: Path to JSON file containing Microsoft Defender profile configurations.
- name: --enable-vpa
type: bool
short-summary: Enable vertical pod autoscaler for cluster.
- name: --enable-optimized-addon-scaling
type: bool
short-summary: Enable optimized addon scaling feature for cluster.
- name: --nodepool-allowed-host-ports
type: string
short-summary: Expose host ports on the node pool. When specified, format should be a comma-separated list of ranges with protocol, eg. 80/TCP,443/TCP,4000-5000/TCP.
- name: --nodepool-asg-ids
type: string
short-summary: The IDs of the application security groups to which the node pool's network interface should belong. When specified, format should be a comma-separated list of IDs.
- name: --node-public-ip-tags
type: string
short-summary: The ipTags of the node public IPs.
- name: --safeguards-level
type: string
short-summary: The deployment safeguards Level. Accepted Values are [Off, Warning, Enforcement]. Requires azure policy addon to be enabled
- name: --safeguards-version
type: string
short-summary: The version of deployment safeguards to use. Default "v1.0.0" Use the ListSafeguardsVersions API to discover available versions
- name: --safeguards-excluded-ns
type: string
short-summary: Comma-separated list of Kubernetes namespaces to exclude from deployment safeguards
- name: --enable-asm --enable-azure-service-mesh
type: bool
short-summary: Enable Azure Service Mesh.
- name: --revision
type: string
short-summary: Azure Service Mesh revision to install.
- name: --enable-azuremonitormetrics
type: bool
short-summary: Enable Azure Monitor Metrics Profile
- name: --enable-azure-monitor-metrics
type: bool
short-summary: Enable Azure Monitor Metrics Profile
- name: --azure-monitor-workspace-resource-id
type: string
short-summary: Resource ID of the Azure Monitor Workspace
- name: --ksm-metric-labels-allow-list
type: string
short-summary: Comma-separated list of additional Kubernetes label keys that will be used in the resource' labels metric. By default the metric contains only name and namespace labels. To include additional labels provide a list of resource names in their plural form and Kubernetes label keys you would like to allow for them (e.g. '=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)'. A single '*' can be provided per resource instead to allow any labels, but that has severe performance implications (e.g. '=pods=[*]').
- name: --ksm-metric-annotations-allow-list
type: string
short-summary: Comma-separated list of additional Kubernetes label keys that will be used in the resource' labels metric. By default the metric contains only name and namespace labels. To include additional labels provide a list of resource names in their plural form and Kubernetes label keys you would like to allow for them (e.g.'=namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...)'. A single '*' can be provided per resource instead to allow any labels, but that has severe performance implications (e.g. '=pods=[*]').
- name: --grafana-resource-id
type: string
short-summary: Resource ID of the Azure Managed Grafana Workspace
- name: --enable-windows-recording-rules
type: bool
short-summary: Enable Windows Recording Rules when enabling the Azure Monitor Metrics addon
- name: --enable-azure-monitor-app-monitoring
type: bool
short-summary: Enable Azure Monitor Application Monitoring
- name: --enable-opentelemetry-metrics
type: bool
short-summary: Enable OpenTelemetry metrics collection. Requires Azure Monitor metrics to be enabled.
- name: --opentelemetry-metrics-port
type: int
short-summary: Port for OpenTelemetry metrics collection (default port will be used if not specified)
- name: --disable-opentelemetry-metrics
type: bool
short-summary: Disable OpenTelemetry metrics collection
- name: --enable-opentelemetry-logs
type: bool
short-summary: Enable OpenTelemetry logs collection. Requires Azure Monitor logs to be enabled.
- name: --opentelemetry-logs-port
type: int
short-summary: Port for OpenTelemetry logs collection (default port will be used if not specified)
- name: --disable-opentelemetry-logs
type: bool
short-summary: Disable OpenTelemetry logs collection
- name: --nodepool-labels
type: string
short-summary: The node labels for all node pools in this cluster. See https://aka.ms/node-labels for syntax of labels.
- name: --nodepool-taints
type: string
short-summary: The node taints for all node pools in this cluster.
- name: --node-init-taints --nodepool-initialization-taints
type: string
short-summary: The node initialization taints for node pools created with aks create operation.
- name: --enable-cost-analysis
type: bool
short-summary: Enable exporting Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. For more information see aka.ms/aks/docs/cost-analysis.
- name: --node-provisioning-mode
type: string
short-summary: Set the node provisioning mode of the cluster. Valid values are "Auto" and "Manual". For more information on "Auto" mode see aka.ms/aks/nap.
- name: --node-provisioning-default-pools
type: string
short-summary: The set of default Karpenter NodePools configured for node provisioning. Valid values are "Auto" and "None".
long-summary: |-
The set of default Karpenter NodePools configured for node provisioning. Valid values are "Auto" and "None".
Auto: A standard set of Karpenter NodePools are provisioned.
None: No Karpenter NodePools are provisioned.
WARNING: Changing this from Auto to None on an existing cluster will cause the default Karpenter NodePools to be deleted, which will in turn drain and delete the nodes associated with those pools. It is strongly recommended to not do this unless there are idle nodes ready to take the pods evicted by that action.
- name: --enable-application-load-balancer
type: bool
short-summary: Enable Application Load Balancer (Application Gateway for Containers) addon.
- name: --enable-app-routing
type: bool
short-summary: Enable Application Routing addon.
- name: --app-routing-default-nginx-controller --ardnc
type: string
short-summary: Configure default nginx ingress controller type. Valid values are annotationControlled (default behavior), external, internal, or none.
- name: --enable-default-domain
type: bool
short-summary: Enable default domain for Application Routing addon.
- name: --enable-ai-toolchain-operator
type: bool
short-summary: Enable AI toolchain operator to the cluster.
- name: --ssh-access
type: string
short-summary: Configure SSH setting for the first system pool in this cluster. Use "disabled" to disable SSH access, "localuser" to enable SSH access using private key. Note, this configuration will not take effect for later created new node pools, please use option `az aks nodepool add --ssh-access` to configure SSH access for new node pools.
- name: --pod-ip-allocation-mode
type: string
short-summary: Set the ip allocation mode for how Pod IPs from the Azure Pod Subnet are allocated to the nodes in the AKS cluster. The choice is between dynamic batches of individual IPs or static allocation of a set of CIDR blocks. Accepted Values are "DynamicIndividual" or "StaticBlock".
long-summary: |
Used together with the "azure" network plugin.
Requires --pod-subnet-id.
- name: --enable-secure-boot
type: bool
short-summary: Enable Secure Boot on all node pools in the cluster. Must use VMSS agent pool type.
- name: --enable-vtpm
type: bool
short-summary: Enable vTPM on all node pools in the cluster. Must use VMSS agent pool type.
- name: --bootstrap-artifact-source
type: string
short-summary: Configure artifact source when bootstraping the cluster.
long-summary: |
The artifacts include the addon image. Use "Direct" to download artifacts from MCR, "Cache" to downalod artifacts from Azure Container Registry.
- name: --bootstrap-container-registry-resource-id
type: string
short-summary: Configure container registry resource ID. Must use "Cache" as bootstrap artifact source.
- name: --if-match
type: string
short-summary: The value provided will be compared to the ETag of the managed cluster, if it matches the operation will proceed. If it does not match, the request will be rejected to prevent accidental overwrites. This must not be specified when creating a new cluster.
- name: --if-none-match
type: string
short-summary: Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster. Other values will be ignored.
- name: --enable-static-egress-gateway
type: bool
short-summary: Enable Static Egress Gateway addon to the cluster.
- name: --enable-imds-restriction
type: bool
short-summary: Enable IMDS restriction in the cluster. Non-hostNetwork Pods will not be able to access IMDS.
- name: --vm-sizes
type: string
short-summary: Comma-separated list of sizes. Must use VirtualMachines agent pool type.
- name: --enable-managed-system-pool
type: bool
short-summary: Create a default ManagedSystem mode that is fully managed by AKS.
long-summary: When set, the default system node pool is created with ManagedSystem mode, where all properties except name and mode are managed by AKS. Learn more at https://aka.ms/aks/nodepool/mode.
- name: --enable-upstream-kubescheduler-user-configuration
type: bool
short-summary: Enable user-defined scheduler configuration for kube-scheduler upstream on the cluster
- name: --enable-gateway-api
type: bool
short-summary: Enable managed installation of Gateway API CRDs from the standard release channel.
- name: --enable-app-routing-istio --enable-ari
type: bool
short-summary: Enable Gateway API based ingress on App Routing via Istio without service mesh functionality.
long-summary: |
This enables an ingress-only version of Istio that reconciles Gateway API resources for App Routing.
It does not provide service mesh functionality (e.g. mTLS, traffic management between services).
Cannot be used simultaneously with the Istio service mesh add-on (--enable-azure-service-mesh).
- name: --enable-hosted-system
type: bool
short-summary: Create a cluster with fully hosted system components. This applies only when creating a new automatic cluster.
examples:
- name: Create a Kubernetes cluster with an existing SSH public key.
text: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey
- name: Create a Kubernetes cluster with a specific version.
text: az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.13.9
- name: Create a Kubernetes cluster with a larger node pool.
text: az aks create -g MyResourceGroup -n MyManagedCluster --node-count 7
- name: Create a kubernetes cluster with cluster autosclaler enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.13.9 --node-count 3 --enable-cluster-autoscaler --min-count 1 --max-count 5
- name: Create a kubernetes cluster with k8s 1.13.9 but use vmas.
text: az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.13.9 --vm-set-type AvailabilitySet
- name: Create a kubernetes cluster with default kubernetes vesrion, default SKU load balancer(standard) and default vm set type(VirtualMachineScaleSets).
text: az aks create -g MyResourceGroup -n MyManagedCluster
- name: Create a kubernetes cluster with standard SKU load balancer and two AKS created IPs for the load balancer outbound connection usage.
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-managed-outbound-ip-count 2
- name: Create a kubernetes cluster with standard SKU load balancer and use the provided public IPs for the load balancer outbound connection usage.
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-outbound-ips <ip-resource-id-1,ip-resource-id-2>
- name: Create a kubernetes cluster with standard SKU load balancer and use the provided public IP prefixes for the load balancer outbound connection usage.
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-outbound-ip-prefixes <ip-prefix-resource-id-1,ip-prefix-resource-id-2>
- name: Create a kubernetes cluster with a standard SKU load balancer, with two outbound AKS managed IPs an idle flow timeout of 5 minutes and 8000 allocated ports per machine
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-managed-outbound-ip-count 2 --load-balancer-idle-timeout 5 --load-balancer-outbound-ports 8000
- name: Create a kubernetes cluster with a AKS managed NAT gateway, with two outbound AKS managed IPs an idle flow timeout of 4 minutes
text: az aks create -g MyResourceGroup -n MyManagedCluster --nat-gateway-managed-outbound-ip-count 2 --nat-gateway-idle-timeout 4
- name: Create a kubernetes cluster with basic SKU load balancer and AvailabilitySet vm set type.
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku basic --vm-set-type AvailabilitySet
- name: Create a kubernetes cluster with authorized apiserver IP ranges.
text: az aks create -g MyResourceGroup -n MyManagedCluster --api-server-authorized-ip-ranges 193.168.1.0/24,194.168.1.0/24,195.168.1.0
- name: Create a kubernetes cluster with server side encryption using your owned key.
text: az aks create -g MyResourceGroup -n MyManagedCluster --node-osdisk-diskencryptionset-id <disk-encryption-set-resource-id>
- name: Create a kubernetes cluster with userDefinedRouting, standard load balancer SKU and a custom subnet preconfigured with a route table
text: az aks create -g MyResourceGroup -n MyManagedCluster --outbound-type userDefinedRouting --load-balancer-sku standard --vnet-subnet-id customUserSubnetVnetID
- name: Create a kubernetes cluster with supporting Windows agent pools with AHUB enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$' --enable-ahub
- name: Create a kubernetes cluster with managed AAD enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-aad --aad-admin-group-object-ids <id-1,id-2> --aad-tenant-id <id>
- name: Create a kubernetes cluster with ephemeral os enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --node-osdisk-type Ephemeral --node-osdisk-size 48
- name: Create a kubernetes cluster with custom tags
text: az aks create -g MyResourceGroup -n MyManagedCluster --tags "foo=bar" "baz=qux"
- name: Create a kubernetes cluster with EncryptionAtHost enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-encryption-at-host
- name: Create a kubernetes cluster with UltraSSD enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-ultra-ssd
- name: Create a kubernetes cluster with custom control plane identity and kubelet identity.
text: az aks create -g MyResourceGroup -n MyManagedCluster --assign-identity <control-plane-identity-resource-id> --assign-kubelet-identity <kubelet-identity-resource-id>
- name: Create a kubernetes cluster with Azure RBAC enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-aad --enable-azure-rbac
- name: Create a kubernetes cluster with a specific os-sku
text: az aks create -g MyResourceGroup -n MyManagedCluster --os-sku Ubuntu
- name: Create a kubernetes cluster with enabling Windows gmsa and with setting DNS server in the vnet used by the cluster.
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$' --enable-windows-gmsa
- name: Create a kubernetes cluster with enabling Windows gmsa but without setting DNS server in the vnet used by the cluster.
text: az aks create -g MyResourceGroup -n MyManagedCluster --load-balancer-sku Standard --network-plugin azure --windows-admin-username azure --windows-admin-password 'replacePassword1234$' --enable-windows-gmsa --gmsa-dns-server "10.240.0.4" --gmsa-root-domain-name "contoso.com"
- name: create a kubernetes cluster with a nodepool snapshot id.
text: az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.20.9 --snapshot-id "/subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/snapshots/mysnapshot1"
- name: create a kubernetes cluster with a cluster snapshot id.
text: az aks create -g MyResourceGroup -n MyManagedCluster --cluster-snapshot-id "/subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/managedclustersnapshots/mysnapshot1"
- name: create a kubernetes cluster with a Capacity Reservation Group(CRG) ID.
text: az aks create -g MyResourceGroup -n MyMC --kubernetes-version 1.20.9 --node-vm-size VMSize --assign-identity CRG-RG-ID --enable-managed-identity --crg-id "subscriptions/SubID/resourceGroups/RGName/providers/Microsoft.ContainerService/CapacityReservationGroups/MyCRGID"
- name: create a kubernetes cluster with support of hostgroup id.
text: az aks create -g MyResourceGroup -n MyMC --kubernetes-version 1.20.13 --location westus2 --host-group-id /subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/hostGroups/myHostGroup --node-vm-size VMSize --enable-managed-identity --assign-identity <user_assigned_identity_resource_id>
- name: Create a kubernetes cluster with no CNI installed.
text: az aks create -g MyResourceGroup -n MyManagedCluster --network-plugin none
- name: Create a kubernetes cluster with safeguards set to "Warning"
text: az aks create -g MyResourceGroup -n MyManagedCluster --safeguards-level Warning --enable-addons azure-policy
- name: Create a kubernetes cluster with safeguards set to "Warning" and some namespaces excluded
text: az aks create -g MyResourceGroup -n MyManagedCluster --safeguards-level Warning --safeguards-excluded-ns ns1,ns2 --enable-addons azure-policy
- name: Create a kubernetes cluster with Azure Service Mesh enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-azure-service-mesh
- name: Create a kubernetes cluster with Azure Monitor Metrics enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-azuremonitormetrics
- name: Create a kubernetes cluster with Azure Monitor App Monitoring enabled
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-azure-monitor-app-monitoring
- name: Create a kubernetes cluster with OpenTelemetry metrics collection enabled
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-opentelemetry-metrics --enable-azuremonitormetrics
- name: Create a kubernetes cluster with OpenTelemetry logs collection enabled
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-opentelemetry-logs --enable-addons monitoring
- name: Create a kubernetes cluster with Azure Monitor logs enabled (shorthand)
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-azure-monitor-logs
- name: Create a kubernetes cluster with OpenTelemetry metrics on custom port
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-opentelemetry-metrics --opentelemetry-metrics-port 8888 --enable-azuremonitormetrics
- name: Create a kubernetes cluster with OpenTelemetry logs on custom port
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-opentelemetry-logs --opentelemetry-logs-port 4317 --enable-azure-monitor-logs
- name: Create a kubernetes cluster with a nodepool having ip allocation mode set to "StaticBlock"
text: az aks create -g MyResourceGroup -n MyManagedCluster --os-sku Ubuntu --max-pods MaxPodsPerNode --network-plugin azure --vnet-subnet-id /subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/NodeSubnet --pod-subnet-id /subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/PodSubnet --pod-ip-allocation-mode StaticBlock
- name: Create a kubernetes cluster with a VirtualMachines nodepool
text: az aks create -g MyResourceGroup -n MyManagedCluster --vm-set-type VirtualMachines --vm-sizes "VMSize1,VMSize2" --node-count 3
- name: Create a kubernetes cluster with a fully managed system node pool
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-managed-system-pool
- name: Create a kubernetes cluster with a managed installation of Gateway API CRDs from the standard release channel.
text: az aks create -g MyResourceGroup -n MyManagedCluster --enable-gateway-api
- name: Create an automatic cluster with hosted system components enabled.
text: az aks create -g MyResourceGroup -n MyManagedCluster --sku automatic --enable-hosted-system
"""
helps['aks delete'] = """
type: command
short-summary: Delete a managed Kubernetes cluster.
parameters:
- name: --if-match
type: string
short-summary: The value provided will be compared to the ETag of the managed cluster, if it matches the operation will proceed. If it does not match, the request will be rejected to prevent accidental overwrites.
- name: --if-none-match
type: string
short-summary: Not applicable for delete operations. This option will be ignored if provided.
- name: --ignore-pod-disruption-budget
type: bool
short-summary: Delete those pods on a node without considering Pod Disruption Budget.
examples:
- name: Delete a managed Kubernetes cluster.
text: az aks delete --name MyManagedCluster --resource-group MyResourceGroup
crafted: true
"""
helps['aks scale'] = """
type: command
short-summary: Scale the node pool in a managed Kubernetes cluster.
parameters:
- name: --node-count -c
type: int
short-summary: Number of nodes in the Kubernetes node pool.
- name: --aks-custom-headers
type: string
short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2
"""
helps['aks stop'] = """
type: command
short-summary: Stop a managed cluster.
long-summary: This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a
cluster stops the control plane and agent nodes entirely, while maintaining all object and
cluster state. A cluster does not accrue charges while it is stopped. See `stopping a
cluster <https://docs.microsoft.com/azure/aks/start-stop-cluster>`_ for more details about
stopping a cluster.
"""
helps['aks upgrade'] = """
type: command
short-summary: Upgrade a managed Kubernetes cluster to a newer version.
long-summary: "Kubernetes will be unavailable during cluster upgrades."
parameters:
- name: --kubernetes-version -k
type: string
short-summary: Version of Kubernetes to upgrade the cluster to, such as "1.11.12".
populator-commands:
- "`az aks get-upgrades`"
- name: --control-plane-only
type: bool
short-summary: Upgrade the cluster control plane only. If not specified, control plane AND all node pools will be upgraded.
- name: --node-image-only
type: bool
short-summary: Only upgrade node image for agent pools.
- name: --cluster-snapshot-id
type: string
short-summary: The source cluster snapshot id is used to upgrade existing cluster.
- name: --aks-custom-headers
type: string
short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2
- name: --enable-force-upgrade
type: bool
short-summary: Enable forceUpgrade cluster upgrade settings override.
- name: --disable-force-upgrade
type: bool
short-summary: Disable forceUpgrade cluster upgrade settings override.
- name: --upgrade-override-until
type: string
short-summary: Until when the cluster upgradeSettings overrides are effective.
long-summary: It needs to be in a valid date-time format that's within the next 30 days. For example, 2023-04-01T13:00:00Z. Note that if --force-upgrade is set to true and --upgrade-override-until is not set, by default it will be set to 3 days from now.
- name: --if-match
type: string
short-summary: The value provided will be compared to the ETag of the managed cluster, if it matches the operation will proceed. If it does not match, the request will be rejected to prevent accidental overwrites. This must not be specified when creating a new cluster.
- name: --if-none-match
type: string
short-summary: Set to '*' to allow a new cluster to be created, but to prevent updating an existing cluster. Other values will be ignored.
examples:
- name: Upgrade a existing managed cluster to a managed cluster snapshot.
text: az aks upgrade -g MyResourceGroup -n MyManagedCluster --cluster-snapshot-id "/subscriptions/00000/resourceGroups/AnotherResourceGroup/providers/Microsoft.ContainerService/managedclustersnapshots/mysnapshot1"
"""
helps['aks update'] = """
type: command
short-summary: Update the properties of a managed Kubernetes cluster.
long-summary: Update the properties of a managed Kubernetes cluster. Can be used for example to enable/disable cluster-autoscaler. When called with no optional arguments this attempts to move the cluster to its goal state without changing the current cluster configuration. This can be used to move out of a non succeeded state.
parameters:
- name: --enable-cluster-autoscaler -e
type: bool
short-summary: Enable cluster autoscaler.
- name: --disable-cluster-autoscaler -d
type: bool
short-summary: Disable cluster autoscaler.
- name: --update-cluster-autoscaler -u
type: bool
short-summary: Update min-count or max-count for cluster autoscaler.
- name: --min-count
type: int
short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 1000]
- name: --max-count
type: int
short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 1000]
- name: --sku
type: string
short-summary: Specify SKU name for managed clusters. '--sku base' enables a base managed cluster. '--sku automatic' enables an automatic managed cluster.
- name: --tier
type: string
short-summary: Specify SKU tier for managed clusters. '--tier standard' enables a standard managed cluster service with a financially backed SLA. '--tier free' changes a standard managed cluster to a free one.
- name: --load-balancer-sku
type: string
short-summary: Azure Load Balancer SKU selection for your cluster. only standard is accepted.
long-summary: Upgrade to Standard Azure Load Balancer SKU for your AKS cluster.
- name: --load-balancer-managed-outbound-ip-count
type: int
short-summary: Load balancer managed outbound IP count.
long-summary: Desired number of managed outbound IPs for load balancer outbound connection. Valid for Standard SKU load balancer cluster only.
- name: --load-balancer-managed-outbound-ipv6-count
type: int
short-summary: Load balancer managed outbound IPv6 IP count.
long-summary: Desired number of managed outbound IPv6 IPs for load balancer outbound connection. Valid for dual-stack (--ip-families IPv4,IPv6) only.
- name: --load-balancer-outbound-ips
type: string
short-summary: Load balancer outbound IP resource IDs.
long-summary: Comma-separated public IP resource IDs for load balancer outbound connection. Valid for Standard SKU load balancer cluster only.
- name: --load-balancer-outbound-ip-prefixes
type: string
short-summary: Load balancer outbound IP prefix resource IDs.
long-summary: Comma-separated public IP prefix resource IDs for load balancer outbound connection. Valid for Standard SKU load balancer cluster only.
- name: --load-balancer-outbound-ports
type: int
short-summary: Load balancer outbound allocated ports.
long-summary: Desired static number of outbound ports per VM in the load balancer backend pool. By default, set to 0 which uses the default allocation based on the number of VMs. Please specify a value in the range of [0, 64000] that is a multiple of 8.
- name: --load-balancer-idle-timeout
type: int
short-summary: Load balancer idle timeout in minutes.
long-summary: Desired idle timeout for load balancer outbound flows, default is 30 minutes. Please specify a value in the range of [4, 100].
- name: --load-balancer-backend-pool-type
type: string
short-summary: Load balancer backend pool type.
long-summary: Load balancer backend pool type, supported values are nodeIP and nodeIPConfiguration.
- name: --cluster-service-load-balancer-health-probe-mode
type: string
short-summary: Set the cluster service health probe mode.
long-summary: Set the cluster service health probe mode. Default is "Servicenodeport".
- name: --nat-gateway-managed-outbound-ip-count
type: int
short-summary: NAT gateway managed outbound IP count.
long-summary: Desired number of managed outbound IPs for NAT gateway outbound connection. Please specify a value in the range of [1, 16]. Valid for Standard SKU load balancer cluster with managedNATGateway or managedNATGatewayV2 outbound type only.
- name: --nat-gateway-idle-timeout
type: int
short-summary: NAT gateway idle timeout in minutes.
long-summary: Desired idle timeout for NAT gateway outbound flows, default is 4 minutes. Please specify a value in the range of [4, 120]. Valid for Standard SKU load balancer cluster with managedNATGateway or managedNATGatewayV2 outbound type only.
- name: --outbound-type
type: string
short-summary: How outbound traffic will be configured for a cluster.
long-summary: This option will change the way how the outbound connections are managed in the AKS cluster. Available options are loadbalancer, managedNATGateway, managedNATGatewayV2, userAssignedNATGateway, userDefinedRouting, none and block. For clusters using a custom virtual network, supported values are loadbalancer, userAssignedNATGateway and userDefinedRouting. For clusters using an AKS-managed virtual network, supported values are loadbalancer, managedNATGateway, managedNATGatewayV2 and userDefinedRouting.
- name: --nrg-lockdown-restriction-level
type: string
short-summary: Restriction level on the managed node resource.
long-summary: The restriction level of permissions allowed on the cluster's managed node resource group, supported values are Unrestricted, and ReadOnly (recommended ReadOnly).
- name: --attach-acr
type: string
short-summary: Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.
- name: --detach-acr
type: string
short-summary: Disable the 'acrpull' role assignment to the ACR specified by name or resource ID.
- name: --api-server-authorized-ip-ranges
type: string
short-summary: Comma-separated list of authorized apiserver IP ranges. Set to "" to allow all traffic on a previously restricted cluster. Set to 0.0.0.0/32 to restrict apiserver traffic to node pools.
- name: --enable-aad
type: bool
short-summary: Enable managed AAD feature for cluster.
- name: --aad-admin-group-object-ids
type: string
short-summary: Comma-separated list of aad group object IDs that will be set as cluster admin.
- name: --aad-tenant-id
type: string
short-summary: The ID of an Azure Active Directory tenant.
- name: --enable-ahub
type: bool
short-summary: Enable Azure Hybrid User Benefits (AHUB) feature for cluster.
- name: --disable-ahub
type: bool
short-summary: Disable Azure Hybrid User Benefits (AHUB) feature for cluster.
- name: --aks-custom-headers