Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bebound opened this issue Feb 27, 2023 · 1 comment
Open

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

bebound opened this issue Feb 27, 2023 · 1 comment

Comments

@bebound
Copy link
Owner

bebound commented Feb 27, 2023

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.

  • Creatre a new AKS cluster from the Azure portal
  • az aks get-credentials --resource-group {} --name {}

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant