azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

aks get credentials throwing traceback

Open infa-anisrini opened this issue 6 years ago • 3 comments

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az aks get-credentials

Errors:

No module named 'azure.mgmt.containerservice.v2019_08_01'
Traceback (most recent call last):
python3.7/site-packages/knack/cli.py, ln 206, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 523, in execute
    self.commands_loader.load_arguments(command)
azure/cli/core/__init__.py, ln 291, in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
...
cliextensions/aks-preview/azext_aks_preview/custom.py, ln 76, in <module>
    from ._helpers import _populate_api_server_access_profile, _set_load_balancer_sku, _set_vm_set_type
cliextensions/aks-preview/azext_aks_preview/_helpers.py, ln 8, in <module>
    from azure.mgmt.containerservice.v2019_08_01.models import ManagedClusterAPIServerAccessProfile
ModuleNotFoundError: No module named 'azure.mgmt.containerservice.v2019_08_01'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az aks get-credentials --resource-group {} --name {}

Expected Behavior

Environment Summary

Darwin-18.6.0-x86_64-i386-64bit
Python 3.7.4
Shell: bash

azure-cli 2.0.72 *

Extensions:
aks-preview 0.4.27

Additional Context

infa-anisrini avatar Jan 23 '20 23:01 infa-anisrini

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm

ghost avatar Jan 24 '20 06:01 ghost

@infa-anisrini can you try upgrading your cli version since its an old version and rerun the cmd?

We've seen these errors thrown on older builds.

jluk avatar Jan 24 '20 17:01 jluk

Hello! Please try again with the latest Azure CLI version. Feel free to reopen an issue if it still doesn't work.

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest

Jen7714 avatar May 29 '20 16:05 Jen7714