bebound / azure-cli

Azure Command-Line Interface
MIT License
0 stars 0 forks source link

az aks get-credentials: [Errno 22] Invalid argument: '"C' #35

Open bebound opened 1 year ago

bebound commented 1 year ago

Describe the bug

After creating a new AKS cluster I'm trying to get access through AD with Powershell. It works with Azure CLI.

az cli version 2.37 and 2.44.1 AKS 1.24.6 Authentication and Authorization: Azure AD authentication with Kubernetes RBAC. I'm part of the authorized groups.

Command Name az aks get-credentials

Errors:

The command failed with an unexpected error. Here is the traceback:
[Errno 22] Invalid argument: '"C'
Traceback (most recent call last):
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 231, in invoke
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 2085, in aks_get_credentials
  File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/acs/custom.py", line 2206, in _print_or_merge_credentials
OSError: [Errno 22] Invalid argument: '"C'

To Reproduce:

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

Expected Behavior

Environment Summary

Windows-10-10.0.22000-SP0
Python 3.10.4
Installer: MSI

azure-cli 2.37.0 *

Extensions:
account 0.2.3

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

Copy from https://github.com/Azure/azure-cli/issues/25282

similar-bot-test[bot] commented 1 year ago
Find similar issue https://github.com/Azure/azure-cli/issues/20996.
Issue title AKS connect fails (Azure Portal generated command)
Create time 2022-01-14
Comment number 6