check if kubectl exists before executing az aks install-cli
All Submissions:
- [YES] Have you added an explanation of what your changes do and why you'd like us to include them?
- [YES] I have updated the documentation accordingly.
- [YES] My code follows the code style of this project.
Current Behavior or Linked Issues
While running deployment pipeline, a random error may occur while executing the command line sudo az aks install-cli
urllib.error.HTTPError: HTTP Error 403: rate limit exceeded
The root cause is that above command downloads packages from GitHub and installs kubectl to the build agent. But there is a API request rate limit set by GitHub:
authenticated user: 5,000 requests per hour
unauthenticated user: 60 requests per hour
Once the limit is exceeded, we'll see the error. As most build agents may already kubectl pre-installed and to avoid hitting the limit, we need to check before installing the tool.
Does this introduce a breaking change?
- [NO]