question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
bacongobblercommented, Oct 18, 2017

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.

1reaction
rjtsdlcommented, Oct 24, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

az acs kubernetes get-credentials --ssh-key-file does not ...
ssh in the users home dir the command fails with Authentication Failed. ... results in the relevant output as follows: ... paramiko.transport : ......
Read more >
opal-azure-cli-acs - PyPI
“az aks get-credentials” will prompt to overwrite duplicated values ... az acs/aks install-cli will install to under %USERPROFILE%.azure-kubectl on Windows.
Read more >
az acs kubernetes get-credentials fails with error The api ...
To configure kubectl to connect to your Kubernetes cluster, run the az acs kubernetes get-credentials command. This step downloads credentials ...
Read more >
Azure Kubernetes Error when running "az aks get-credentials ...
When you use the command az aks get-credentials without parameter --admin , it means the CLI command uses the default value: Cluster user....
Read more >
如何安裝最新版的Azure CLI 2.0 命令列工具
... az acs kubernetes get-credentials fails in azure-cli-acs 2.0.17 · Issue #4679 · Azure/azure-cli. pip install azure-cli-acs==2.0.16 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found