Skip to content

az aks install-cli --client-version 1.30.5 --install-location ./kubectl sent 404 Not Found #30101

@DidouJazz

Description

@DidouJazz

Describe the bug

Running this on Rocky Linux.

Here is my AZ CLi version:
az version
{
"azure-cli": "2.38.2",
"azure-cli-core": "2.38.2",
"azure-cli-telemetry": "1.0.6",
"extensions": {}
}

When running:
az aks install-cli --client-version 1.30.5 --install-location ./kubectl
Downloading client to "./kubectl" from "https://storage.googleapis.com/kubernetes-release/release/v1.30.5/bin/linux/amd64/kubectl"
Connection error while attempting to download client (HTTP Error 404: Not Found)

As AKS 1.30.5 has been released (and is now default for 1.30), the corresponding kubectl version should also be available to download.

Workaround (but not considered as a solution):
Download version 1.30.4 but as we have scripted everything we are getting 1.30.5 automatically.
Dowload version 1.30.5 from https://dl.k8s.io/release/v1.30.5/bin/linux/amd64/kubectl

Exepcted results:
Same as for 1.30.4:
Downloading client to "./kubectl" from "https://storage.googleapis.com/kubernetes-release/release/v1.30.5/bin/linux/amd64/kubectl"
Please ensure that . is in your search PATH, so the kubectl command can be found.
Downloading client to "/tmp/tmpplxuv1d9/kubelogin.zip" from "https://github.com/Azure/kubelogin/releases/download/v0.1.4/kubelogin.zip"
Please ensure that /usr/local/bin is in your search PATH, so the kubelogin command can be found.

Related command

az aks install-cli --client-version 1.30.5 --install-location ./kubectl

Errors

Connection error while attempting to download client (HTTP Error 404: Not Found)

Issue script & Debug output

cli.knack.cli: Command arguments: ['aks', 'install-cli', '--debug', '--client-version', '1.30.5', '--install-location', './kubectl']
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 0x7fbe8d4b9a60>, <function OutputProducer.on_global_arguments at 0x7fbe8d3ca430>, <function CLIQuery.on_global_arguments at 0x7fbe8d3cf8b0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'aks': ['azure.cli.command_modules.acs']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: acs 0.110 8 58
cli.azure.cli.core: Total (1) 0.110 8 58
cli.azure.cli.core: Loaded 8 groups, 58 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : aks install-cli
cli.azure.cli.core: Command table: aks install-cli
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7fbe8c926f70>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/root/.azure/commands/2024-10-16.11-19-53.aks_install-cli.14096.log'.
az_command_data_logger: command args: aks install-cli --debug --client-version {} --install-location {}
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7fbe8c8be430>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7fbe8c8a3940>, <function register_cache_arguments..add_cache_arguments at 0x7fbe8c8a3a60>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7fbe8d3ca4c0>, <function CLIQuery.handle_query_parameter at 0x7fbe8d3cf940>, <function register_ids_argument..parse_ids_arguments at 0x7fbe8c8a39d0>]
cli.azure.cli.command_modules.acs.custom: Downloading client to "./kubectl" from "https://storage.googleapis.com/kubernetes-release/release/v1.30.5/bin/linux/amd64/kubectl"
cli.azure.cli.core.util: azure.cli.core.util.handle_exception is called with an exception:
cli.azure.cli.core.util: Traceback (most recent call last):
File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 2537, in k8s_install_kubectl
_urlretrieve(file_url, install_location)
File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 2652, in _urlretrieve
req = urlopen(url, context=_ssl_context())
File "/usr/lib64/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/lib64/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/lib64/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/usr/lib64/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/lib64/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/lib64/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 663, in execute
raise ex
File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job
result = cmd_copy(params)
File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 333, in call
return self.handler(*args, **kwargs)
File "/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 2489, in k8s_install_cli
k8s_install_kubectl(cmd, client_version, install_location, base_src_url)
File "/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 2541, in k8s_install_kubectl
raise CLIError(
knack.util.CLIError: Connection error while attempting to download client (HTTP Error 404: Not Found)

cli.azure.cli.core.azclierror: Connection error while attempting to download client (HTTP Error 404: Not Found)
az_command_data_logger: Connection error while attempting to download client (HTTP Error 404: Not Found)
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7fbe8c9271f0>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 0.602 seconds (init: 0.095, invoke: 0.507)
telemetry.save: Save telemetry record of length 2944 in cache
telemetry.check: Negative: The /root/.azure/telemetry.txt was modified at 2024-10-16 11:10:38.608182, which in less than 600.000000 s

Expected behavior

Downloading client to "./kubectl" from "https://storage.googleapis.com/kubernetes-release/release/v1.30.5/bin/linux/amd64/kubectl"
Please ensure that . is in your search PATH, so the kubectl command can be found.
Downloading client to "/tmp/tmpplxuv1d9/kubelogin.zip" from "https://github.com/Azure/kubelogin/releases/download/v0.1.4/kubelogin.zip"
Please ensure that /usr/local/bin is in your search PATH, so the kubelogin command can be found.

Environment Summary

azure-cli 2.38.2 *

core 2.38.2 *
telemetry 1.0.6 *

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

Python location '/usr/bin/python3'
Extensions directory '/home/sas/.azure/cliextensions'

Python (Linux) 3.9.18 (main, Aug 23 2024, 00:00:00)
[GCC 11.4.1 20231218 (Red Hat 11.4.1-3)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    AKSaz aks/acs/openshiftAuto-AssignAuto assign by botAuto-ResolveAuto resolve by botService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions