Skip to content

Commit

Permalink
[AKS] az aks create: Add --network-plugin=none support for BYO CNI (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
FumingZhang authored Jul 27, 2022
1 parent 95ad69d commit d5340bf
Show file tree
Hide file tree
Showing 5 changed files with 943 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/azure-cli/azure/cli/command_modules/acs/_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
# network plugin
CONST_NETWORK_PLUGIN_KUBENET = "kubenet"
CONST_NETWORK_PLUGIN_AZURE = "azure"
CONST_NETWORK_PLUGIN_NONE = "none"

# consts for addons
# http application routing
Expand Down
8 changes: 5 additions & 3 deletions src/azure-cli/azure/cli/command_modules/acs/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,11 @@
- name: --max-pods -m
type: int
short-summary: The maximum number of pods deployable to a node.
long-summary: If not specified, defaults to 110, or 30 for advanced networking configurations.
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 advanced networking configurations. Defaults to "kubenet".
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. Defaults to "kubenet".
- name: --network-policy
type: string
short-summary: The Kubernetes network policy to use.
Expand Down Expand Up @@ -610,6 +610,8 @@
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 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
"""

helps['aks update'] = """
Expand Down Expand Up @@ -1009,7 +1011,7 @@
- name: --max-pods -m
type: int
short-summary: The maximum number of pods deployable to a node.
long-summary: If not specified, defaults to 110, or 30 for advanced networking configurations.
long-summary: If not specified, defaults based on network-plugin. 30 for "azure", 110 for "kubenet", or 250 for "none".
- name: --zones -z
type: string array
short-summary: Availability zones where agent nodes will be placed.
Expand Down
4 changes: 2 additions & 2 deletions src/azure-cli/azure/cli/command_modules/acs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
get_vm_size_completion_list)
from azure.cli.command_modules.acs._consts import (
CONST_LOAD_BALANCER_SKU_BASIC, CONST_LOAD_BALANCER_SKU_STANDARD,
CONST_NETWORK_PLUGIN_AZURE, CONST_NETWORK_PLUGIN_KUBENET,
CONST_NETWORK_PLUGIN_AZURE, CONST_NETWORK_PLUGIN_KUBENET, CONST_NETWORK_PLUGIN_NONE,
CONST_NODE_IMAGE_UPGRADE_CHANNEL, CONST_NODEPOOL_MODE_SYSTEM,
CONST_NODEPOOL_MODE_USER, CONST_NONE_UPGRADE_CHANNEL,
CONST_OS_DISK_TYPE_EPHEMERAL, CONST_OS_DISK_TYPE_MANAGED,
Expand Down Expand Up @@ -101,7 +101,7 @@

# consts for ManagedCluster
load_balancer_skus = [CONST_LOAD_BALANCER_SKU_BASIC, CONST_LOAD_BALANCER_SKU_STANDARD]
network_plugins = [CONST_NETWORK_PLUGIN_KUBENET, CONST_NETWORK_PLUGIN_AZURE]
network_plugins = [CONST_NETWORK_PLUGIN_KUBENET, CONST_NETWORK_PLUGIN_AZURE, CONST_NETWORK_PLUGIN_NONE]
outbound_types = [CONST_OUTBOUND_TYPE_LOAD_BALANCER, CONST_OUTBOUND_TYPE_USER_DEFINED_ROUTING, CONST_OUTBOUND_TYPE_MANAGED_NAT_GATEWAY, CONST_OUTBOUND_TYPE_USER_ASSIGNED_NAT_GATEWAY]
auto_upgrade_channels = [
CONST_RAPID_UPGRADE_CHANNEL,
Expand Down
Loading

0 comments on commit d5340bf

Please sign in to comment.