No description
Find a file
Chitoku 42b5b7bc56
Some checks failed
CodeQL Advanced / Analyze (javascript-typescript) (push) Failing after 1s
Integration test for setup-kubectl / Validate release and master branch (push) Failing after 1s
Run prettify / Prettier Check (push) Failing after 1s
Run unit tests. / build (push) Failing after 1s
Update stableVersionUrl to dl.k8s.io (#190)
2025-09-08 10:00:19 -04:00
.github Bump github/codeql-action in /.github/workflows in the actions group (#189) 2025-08-26 12:05:15 -07:00
.husky Add husky precommit check in the repo. (#171) 2025-07-03 10:55:16 +12:00
src Update stableVersionUrl to dl.k8s.io (#190) 2025-09-08 10:00:19 -04:00
test Update stableVersionUrl to dl.k8s.io (#190) 2025-09-08 10:00:19 -04:00
.gitignore Updated workflows, codeowners, and gitignore. (#42) 2022-02-03 16:37:04 -05:00
.prettierignore Vidya reddy prettier (#58) 2022-06-27 15:31:07 -07:00
.prettierrc.json Vidya reddy prettier (#58) 2022-06-27 15:31:07 -07:00
action.yml Bump node to version 20 (#90) 2024-01-26 16:23:31 -05:00
CHANGELOG.md 4.0.1 fix v prefix (#167) 2025-06-18 13:57:02 -04:00
CODE_OF_CONDUCT.md Security: remove updated action and fix prettier (#134) 2025-02-07 12:00:17 -08:00
jest.config.js Vidya reddy prettier (#58) 2022-06-27 15:31:07 -07:00
LICENSE Initial commit 2019-09-04 03:28:39 -07:00
package-lock.json Bump @types/node from 24.2.1 to 24.3.0 in the actions group (#188) 2025-08-20 02:29:22 +12:00
package.json Bump @types/node from 24.2.1 to 24.3.0 in the actions group (#188) 2025-08-20 02:29:22 +12:00
README.md Update README.md (#102) 2024-08-01 11:27:45 -04:00
SECURITY.md Security: remove updated action and fix prettier (#134) 2025-02-07 12:00:17 -08:00
tsconfig.json Resolve #104 : Enhance Version Handling: Auto-Resolve kubectl Major.Minor to Latest Patch (#172) 2025-07-11 15:31:20 -06:00

Setup Kubectl

Sample workflow to install a specific version of kubectl binary on the runner.

Acceptable values are latest or any semantic version string like v1.15.0. Use this action in workflow to define which version of kubectl will be used.

- uses: azure/setup-kubectl@v4
  with:
     version: '<version>' # default is latest stable
  id: install

Refer to the action metadata file for details about all the inputs https://github.com/Azure/setup-kubectl/blob/main/action.yml

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Support

setup-kubectl is an open source project that is not covered by the Microsoft Azure support policy. Please search open issues here, and if your issue isn't already represented please open a new one. The project maintainers will respond to the best of their abilities.