az aks install-connector fails with "--name unknown parameter"

2/4/2020

I am trying to install a test Kubernetes cluster. I the latest version of Azure CLI on my computer along with the latest Helm. When I run the command:

az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup --connector-name virtual-kubelet --os-type Both

I get the error:

Deploying the ACI connector for 'Linux' using Helm
Error: unknown flag: --name
Deploying the ACI connector for 'Windows' using Helm
Error: unknown flag: --name

It appears that "az aks install-connector" is generating a badly formed command for helm. Can anyone shed light on how to get around this?

-- Jim Wilcox
azure
kubernetes
kubernetes-helm

1 Answer

2/5/2020

It caused by helm 3. Actually the CLI command az aks install-connector will use helm 3 to install the chart that shows in it. But the helm 3 does not have the flag --name, see the helm 3 commands. So it will cause the error:

Error: unknown flag: --name

You can see the flag --name in helm 2 commands.

The solution is that you can skip the CLI command and use the helm 3 directly to install the chart in the AKS cluster. And you can find the chart in the parameter --chart-url of the CLI command here. Or use the helm 2 instead of helm 3.

-- Charles Xu
Source: StackOverflow