az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
I noticed there's an option (in preview) to specify ingress-appgw to az aks enable-addons but I get this error
az aks enable-addons --resource-group aksRG --name kaohaks --addons ingress-appgw --appgw-id /subscriptions/{sub-id}/resourceGroups/myagwRG/providers/Microsoft.Network/applicationGateways/allamrajuagw --appgw-name allamrajuagw
The behavior of this command has been altered by the following extension: aks-preview
The command failed with an unexpected error. Here is the traceback:
argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 608, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 666, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 659, in _run_job
six.reraise(sys.exc_info())
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/six.py", line 703, in reraise
raise value
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 636, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 306, in __call__
return self.handler(args, kwargs)
File "/usr/local/Cellar/azure-cli/2.2.0_1/libexec/lib/python3.8/site-packages/azure/cli/core/__init__.py", line 493, in default_command_handler
return op(command_args)
File "/Users/kumara/.azure/cliextensions/aks-preview/azext_aks_preview/custom.py", line 2233, in aks_enable_addons
if CONST_INGRESS_APPGW_APPLICATION_GATEWAY_ID in instance.addon_profiles[CONST_INGRESS_APPGW_ADDON_NAME].config:
TypeError: argument of type 'NoneType' is not iterable
My az cli version is
az version
This command is in preview. It may be changed/removed in a future release.
{
"azure-cli": "2.2.0",
"azure-cli-command-modules-nspkg": "2.0.3",
"azure-cli-core": "2.2.0",
"azure-cli-nspkg": "3.0.4",
"azure-cli-telemetry": "1.0.4",
"extensions": {
"aks-preview": "0.4.33",
"db-up": "0.1.13",
"dev-spaces": "1.0.3"
}
}
Do I need to add an extension before running this command?
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.
thanks for reporting, we'll look at it
I don't think this is a supported addon option yet? @kumarallamraju where are you taking this example command from?
@jluk
bash-3.2$ az aks enable-addons -h
The behavior of this command has been altered by the following extension: aks-preview
The extension is in preview
Command
az aks enable-addons : Enable Kubernetes addons.
These addons are available:
http_application_routing - configure ingress with automatic public DNS name creation.
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 (PREVIEW). Requires --subnet-name to
provide the name of an existing subnet for the Virtual Node to use.
azure-policy - enable Azure policy (PREVIEW).
ingress-appgw - enable Application Gateway Ingress Controller addon
(PREVIEW).
Hey @kumarallamraju the AGIC add-on will be available in preview soon, you were able to see this because this was merged into Az CLI extensions repo since we were planning to release this earlier.
Closing the issue as this is a bug that will be resolved when the appgateway addon is released.
@jluk @mscatyao I have same error after this globally introduced"
az aks enable-addons -n xxx -g xxx -a ingress-appgw --appgw-id $appgwId
The behavior of this command has been altered by the following extension: aks-preview
The command failed with an unexpected error. Here is the traceback:
argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 654, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 711, in _run_job
six.reraise(*sys.exc_info())
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/six.py", line 703, in reraise
raise value
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/azure/cli/core/commands/__init__.py", line 325, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.7.0/libexec/lib/python3.8/site-packages/azure/cli/core/__init__.py", line 545, in default_command_handler
return op(**command_args)
File "/Users/329315295/.azure/cliextensions/aks-preview/azext_aks_preview/custom.py", line 2283, in aks_enable_addons
if CONST_INGRESS_APPGW_APPLICATION_GATEWAY_ID in instance.addon_profiles[CONST_INGRESS_APPGW_ADDON_NAME].config:
TypeError: argument of type 'NoneType' is not iterable
These seem to be coming from an older release.
Can you please update the extension:
az extension update -n aks-preview
Worked. Thanks, had not found any prerequisite for it in docs.
@mhsh64 thanks, we will add this to the docs.
@mhsh64
You should see

in the Use Azure Cloud Shell
@akshaysngupta / @mscatyao can we callout the specific extension version number required (0.4.51)? that might help clarify.
Most helpful comment
@mhsh64

You should see
in the Use Azure Cloud Shell