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

ValueError for az aks check-acr with AKS 1.27.100 LTS. #30667

Open
JamieLoManJyu opened this issue Jan 16, 2025 · 2 comments
Open

ValueError for az aks check-acr with AKS 1.27.100 LTS. #30667

JamieLoManJyu opened this issue Jan 16, 2025 · 2 comments
Labels
AKS az aks/acs/openshift Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.

Comments

@JamieLoManJyu
Copy link

Describe the bug

I have an ACR attached to a version 1.27.100 LTS AKS cluster. When running az aks check-acr, getting the error ValueError: invalid literal for int() with base 10: '100-akslts'.

Related command

az aks check-acr --resource-group <MyResourceGroup> --name <MyManagedCluster> --acr <myacr>.azurecr.io

Errors

The command failed with an unexpected error. Here is the traceback:
invalid literal for int() with base 10: '100-akslts'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/acs/custom.py", line 1637, in aks_check_acr
    kubectl_server_patch = int(
                           ^^^^
ValueError: invalid literal for int() with base 10: '100-akslts'

Issue script & Debug output

cli.knack.cli: Command arguments: ['aks', 'check-acr', '--resource-group', '<MyResourceGroup>', '--name', '<MyManagedCluster>', '--acr', '<myacr>.azurecr.io', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7fd363e33740>, <function OutputProducer.on_global_arguments at 0x7fd363b7e700>, <function CLIQuery.on_global_arguments at 0x7fd363bc3c40>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'aks': ['azure.cli.command_modules.acs', 'azure.cli.command_modules.serviceconnector']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: acs                       0.070        14        77
cli.azure.cli.core: serviceconnector          0.068        20       315
cli.azure.cli.core: Total (2)                 0.138        34       392
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (0)                 0.000         0         0  
cli.azure.cli.core: Loaded 33 groups, 392 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : aks check-acr
cli.azure.cli.core: Command table: aks check-acr
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fd362f5ad40>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/azureuser/.azure/commands/2025-01-16.20-10-19.aks_check-acr.1224292.log'.
az_command_data_logger: command args: aks check-acr --resource-group {} --name {} --acr {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7fd362f9ff60>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7fd362fd20c0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7fd362fd2200>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x7fd362fd22a0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fd363b7e7a0>, <function CLIQuery.handle_query_parameter at 0x7fd363bc3ce0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7fd362fd2160>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=ContainerServiceClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/azureuser/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/azureuser/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
msal.authority: openid_config("https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_credentials: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Found 1 RTs matching {'environment': 'login.microsoftonline.com', 'home_account_id': '********.xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', 'family_id': '1'}
msal.telemetry: Generate or reuse correlation_id: e842636b-d84f-4112-87a5-74d8c074fe26
msal.application: Cache attempts an RT
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/token HTTP/1.1" 200 5535
msal.token_cache: event={
    "client_id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "data": {
        "claims": "{\"access_token\": {\"xms_cc\": {\"values\": [\"CP1\"]}}}",
        "refresh_token": "********",
        "scope": [
            "profile",
            "openid",
            "offline_access",
            "https://management.core.windows.net//.default"
        ]
    },
    "environment": "login.microsoftonline.com",
    "grant_type": "refresh_token",
    "params": null,
    "response": {
        "access_token": "********",
        "client_info": "****************************************************************",
        "expires_in": 4711,
        "ext_expires_in": 4711,
        "foci": "1",
        "id_token": "********",
        "scope": "https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default",
        "token_type": "Bearer"
    },
    "scope": [
        "https://management.core.windows.net//user_impersonation",
        "https://management.core.windows.net//.default"
    ],
    "skip_account_creation": true,
    "token_endpoint": "https://login.microsoftonline.com/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/token"
}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/<MyResourceGroup>/providers/Microsoft.ContainerService/managedClusters/<MyManagedCluster>/listClusterUserCredential?api-version=2024-09-01'
cli.azure.cli.core.sdk.policies: Request method: 'POST'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': 'daa771ee-d402-11ef-b154-e753c59041a8'
cli.azure.cli.core.sdk.policies:     'CommandName': 'aks check-acr'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --acr --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.68.0 (DEB) azsdk-python-core/1.31.0 Python/3.12.8 (Linux-5.15.0-1072-azure-x86_64-with-glibc2.31)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/<MyResourceGroup>/providers/Microsoft.ContainerService/managedClusters/<MyManagedCluster>/listClusterUserCredential?api-version=2024-09-01 HTTP/1.1" 200 12953
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '12953'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-writes': '2999'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '199'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '0b5d2d1c-7baf-4498-b68d-0dc62269369c'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'e76a6a47-c069-4e36-8bcf-1a3a3013a250'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTINDIA:20250116T121021Z:0b5d2d1c-7baf-4498-b68d-0dc62269369c'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: D23D7BA2378A4FA6AA96BF509084C0B9 Ref B: MAA201060515021 Ref C: 2025-01-16T12:10:20Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Thu, 16 Jan 2025 12:10:21 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {
 "kubeconfigs": [
  {
   "name": "clusterUser",
   "value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
 ]
}
cli.azure.cli.command_modules.acs.custom: Merged "<MyManagedCluster>" as current context in /tmp/tmp9ypybqij
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/acs/custom.py", line 1637, in aks_check_acr
    kubectl_server_patch = int(
                           ^^^^
ValueError: invalid literal for int() with base 10: '100-akslts'

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: invalid literal for int() with base 10: '100-akslts'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/acs/custom.py", line 1637, in aks_check_acr
    kubectl_server_patch = int(
                           ^^^^
ValueError: invalid literal for int() with base 10: '100-akslts'
az_command_data_logger: invalid literal for int() with base 10: '100-akslts'
Traceback (most recent call last):
  File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
    raise ex
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/acs/custom.py", line 1637, in aks_check_acr
    kubectl_server_patch = int(
                           ^^^^
ValueError: invalid literal for int() with base 10: '100-akslts'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fd362f5afc0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 3.234 seconds (init: 0.160, invoke: 3.074)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 7975 in cache file under /home/azureuser/.azure/telemetry/20250116201022675
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.12/site-packages/azure/cli/telemetry/__init__.py /home/azureuser/.azure /home/azureuser/.azure/telemetry/20250116201022675"
telemetry.process: Return from creating process 1224308
telemetry.main: Finish creating telemetry upload process.

Expected behavior

A sample output of a working scenario:

[2025-01-16T12:21:01Z] Checking host name resolution (<myacr>.azurecr.io): SUCCEEDED
[2025-01-16T12:21:01Z] Canonical name for ACR (<myacr>.azurecr.io): r1024eus-az.eastus.cloudapp.azure.com.
[2025-01-16T12:21:01Z] ACR location: eastus
[2025-01-16T12:21:01Z] Checking ACR location matches cluster location: FAILED
[2025-01-16T12:21:01Z] ACR location 'eastus' does not match your cluster location 'northcentralus'. This may result in slow image pulls and extra cost.
[2025-01-16T12:21:01Z] Checking managed identity...
[2025-01-16T12:21:01Z] Kubelet managed identity client ID: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[2025-01-16T12:21:01Z] Validating managed identity existance: SUCCEEDED
[2025-01-16T12:21:01Z] Validating image pull permission: FAILED
[2025-01-16T12:21:01Z] ACR <myacr>.azurecr.io rejected token exchange: ACR token exchange endpoint returned error status: 400. body: {"errors":[{"code":"SERVICE_INVALID","message":"Service is invalid. CorrelationId: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}]}

Environment Summary

azure-cli                         2.68.0

core                              2.68.0
telemetry                          1.1.0

Extensions:
account                            0.2.5
costmanagement                     1.0.0
k8s-extension                      1.6.1
vm-repair                          1.0.9

Dependencies:
msal                              1.31.1
azure-mgmt-resource               23.1.1

Python location '/opt/az/bin/python3'
Extensions directory '/home/jamielo/.azure/cliextensions'

Python (Linux) 3.12.8 (main, Jan  8 2025, 03:38:24) [GCC 9.4.0]

Additional context

The line returning error: azure-cli/src/azure-cli/azure/cli/command_modules/acs/custom.py#L1637 · Azure/azure-cli

            kubectl_server_patch = int(
                kubectl_version["serverVersion"]["gitVersion"].split(".")[-1])

When retrieving serverVersion.gitVersion from kubectl version -o json --kubeconfig ~/.kube/config, getting v1.27.100-akslts.

...
  "serverVersion": {
    "major": "1",
    "minor": "27",
    "gitVersion": "v1.27.100-akslts",
    "gitCommit": "ffcbcebd3b625d743814f7f7cbdb05cccc32d013",
    "gitTreeState": "clean",
    "buildDate": "2024-10-17T05:50:02Z",
    "goVersion": "go1.22.7",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}

The issue is not seen with a version 1.30.0 LTS AKS cluster. For 1.30.0 LTS AKS cluster, getting v1.30.0.

...
  "serverVersion": {
    "major": "1",
    "minor": "30",
    "gitVersion": "v1.30.0",
    "gitCommit": "7c48c2bd72b9bf5c44d21d7338cc7bea77d0ad2a",
    "gitTreeState": "clean",
    "buildDate": "2024-04-18T00:07:34Z",
    "goVersion": "go1.22.2",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}
@JamieLoManJyu JamieLoManJyu added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 16, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 16, 2025

Thank you for opening this issue, we will look into it.

@JamieLoManJyu JamieLoManJyu changed the title ValueError for az aks check-acr with AKS 1.27.100 LTS. ValueError for az aks check-acr with AKS 1.27.100 LTS. Jan 16, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added AKS az aks/acs/openshift Service Attention This issue is responsible by Azure service team. Auto-Assign Auto assign by bot labels Jan 16, 2025
@commandewncos
Copy link

Hi there! I'm with same error:

(Command)
` az aks check-acr --resource-group $RESOURCE_GROUP_NAME --name $AKS_NAME \

--acr $ACR_NAME.azurecr.i`

(Output)
Unable to connect to the server: getting credentials: exec: executable kubelogin not found

It looks like you are trying to use a client-go credential plugin that is not installed.

To learn more about this feature, consult the documentation available at:
https://kubernetes.io/docs/reference/access-authn-authz/authentication/#client-go-credential-plugins

kubelogin is not installed which is required to connect to AAD enabled cluster.

To learn more, please go to https://aka.ms/aks/kubelogin
The command failed with an unexpected error. Here is the traceback:
'serverVersion'
Traceback (most recent call last):
File "/opt/az/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 666, in execute
raise ex
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 733, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 703, in _run_job
result = cmd_copy(params)
^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 336, in call
return self.handler(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.12/site-packages/azure/cli/command_modules/acs/custom.py", line 1622, in aks_check_acr
kubectl_version["serverVersion"]["minor"])
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'serverVersion'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AKS az aks/acs/openshift Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants