azure-cli: az acs kubernetes get-credentials fails in azure-cli-acs 2.0.17

Description

Outline the issue here: Unable to obtain kubectl config in latest version of CLI

Works in older version: pip install azure-cli-acs==2.0.16

Trace:

Traceback (most recent call last):
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/main.py", line 36, in main
    cmd_result = APPLICATION.execute(args)
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/core/application.py", line 212, in execute
    result = expanded_arg.func(params)
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 377, in __call__
    return self.handler(*args, **kwargs)
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 620, in _execute_command
    reraise(*sys.exc_info())
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 602, in _execute_command
    result = op(client, **kwargs) if client else op(**kwargs)
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 814, in k8s_get_credentials
    _k8s_get_credentials_internal(name, acs_info, path, ssh_key_file)
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 836, in _k8s_get_credentials_internal
    '.kube/config', path_candidate, key_filename=ssh_key_file)
  File "/Users/apopovich/pythonenvs/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/acs_client.py", line 65, in secure_copy
    proxy = paramiko.ProxyCommand(host_config['proxycommand'])
KeyError: 'proxycommand'

interestingly in ssh library this key gets removed: https://github.com/paramiko/paramiko/blob/6978c7a0b8faa683b119de3a0c096be31ac4fdc9/paramiko/config.py#L137


Environment summary

Python 3.6.3 virtual environment

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: pip install azure-cli==2.0.18

CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here:

azure-cli (2.0.18)

acr (2.0.13)
acs (2.0.17)
appservice (0.1.18)
backup (1.0.1)
batch (3.1.5)
billing (0.1.5)
cdn (0.0.9)
cloud (2.0.8)
cognitiveservices (0.1.8)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.11)
consumption (0.1.5)
container (0.1.11)
core (2.0.18)
cosmosdb (0.1.13)
dla (0.0.12)
dls (0.0.15)
eventgrid (0.1.4)
extension (0.0.4)
feedback (2.0.6)
find (0.2.7)
interactive (0.3.10)
iot (0.1.12)
keyvault (2.0.12)
lab (0.0.11)
monitor (0.0.10)
network (2.0.16)
nspkg (3.0.1)
profile (2.0.14)
rdbms (0.0.7)
redis (0.2.9)
resource (2.0.16)
role (2.0.13)
servicefabric (0.0.4)
sf (1.0.8)
sql (2.0.13)
storage (2.0.17)
vm (2.0.16)

Python location '/Users/user/pythonenvs/az/bin/python'
Extensions directory '/Users/user/.azure/cliextensions'

Python (Darwin) 3.6.3 (default, Oct  4 2017, 06:09:15)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]

Legal docs and information: aka.ms/AzureCliLegal

OS Version: What OS and version are you using?
Answer here: MacOS Sierra 10.12.6

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: zsh

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 15 (3 by maintainers)

Most upvoted comments

It looks like this was fixed relatively recently: https://github.com/Azure/azure-cli/commit/5b4a0dbb89ab45b6dd59bde0e87e789a866e5ff9

See #4646 for ways to install the bleeding edge of azure-cli.

@troydai it should be fixed now. We can close this.