azure-cli: HTTP Error 403: rate limit exceeded - az aks install cli
Describe the bug
Sometimes when using bitbucket pipelines from mcr.microsoft.com/azure-cli:latest image i get the 403 Error while
az aks install cli command is executed
To Reproduce
occurs randomly
Expected behavior aks cli is installed
Environment summary
Additional context
Downloading client to "/usr/local/bin/kubectl" from "https://storage.googleapis.com/kubernetes-release/release/v1.19.4/bin/linux/amd64/kubectl"
Please ensure that /usr/local/bin is in your search PATH, so the `kubectl` command can be found.
CLIInternalError: The command failed with an unexpected error. Here is the traceback:
HTTP Error 403: rate limit exceeded
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/knack/cli.py", line 215, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 654, in execute
raise ex
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 711, in _run_job
six.reraise(*sys.exc_info())
File "/usr/local/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 688, in _run_job
result = cmd_copy(params)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 325, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 784, in default_command_handler
return op(**command_args)
File "/usr/local/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 329, in k8s_install_cli
k8s_install_kubelogin(cmd, kubelogin_version, kubelogin_install_location)
File "/usr/local/lib/python3.6/site-packages/azure/cli/command_modules/acs/custom.py", line 407, in k8s_install_kubelogin
latest_release = urlopen(latest_release_url, context=context).read()
File "/usr/local/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/local/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: rate limit exceeded```
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 14
- Comments: 17 (1 by maintainers)
Any updates on this? I agree with @timbodeit. Why don’t we have a second image that has the aks cli preinstalled?
Suggested solution: Rather than increasing rate limits by IP, provide a second variant of the azure-cli Docker container, that already comes with the aks cli preinstalled. That way, pipelines based on Microsoft’s Docker images wouldn’t need to manually install it manually on each run in the first place.
@bkozub Would that resolve the issue for you as well?
Rel: https://github.com/Azure/azure-cli/issues/19965#issuecomment-1688162845
Any new updates on this case? We still encounter this issue!
I am also facing the same issue. This issue exists since 2020. How is it possible, that this problem has not been solved yet, event tho a lot of users (as you can see in this comment history) are facing this issue?
We noticed the same behaviour/issue in our build infrastructure where we build docker images. Is there any update on this issue?