GitHub Action for installing Kubectl
Find a file
David Gamero 5f8d8195ef
Some checks failed
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Integration test for setup-kubectl / Validate release and master branch (push) Has been cancelled
Run prettify / Prettier Check (push) Has been cancelled
Run unit tests. / build (push) Has been cancelled
Migrate to ESM with esbuild and vitest (#243)
* Migrate to ESM with esbuild, vitest and upgrade @actions/* to ESM-only versions

* fix: update lockfile for npm ci compatibility

---------

Co-authored-by: Suneha Bose <suneha.bose@gmail.com>
2026-04-03 10:48:25 -07:00
.github Migrate to ESM with esbuild and vitest (#243) 2026-04-03 10:48:25 -07:00
.husky Add husky precommit check in the repo. (#171) 2025-07-03 10:55:16 +12:00
src Migrate to ESM with esbuild and vitest (#243) 2026-04-03 10:48:25 -07: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 Update Node version from 20 to 24 in action.yml (#233) 2026-03-12 13:34:30 -04:00
CHANGELOG.md release: v5.0.0 — node24 upgrade and dependency updates (#240) 2026-03-25 09:38:57 -07:00
CODE_OF_CONDUCT.md Security: remove updated action and fix prettier (#134) 2025-02-07 12:00:17 -08:00
LICENSE Initial commit 2019-09-04 03:28:39 -07:00
package-lock.json Migrate to ESM with esbuild and vitest (#243) 2026-04-03 10:48:25 -07:00
package.json Migrate to ESM with esbuild and vitest (#243) 2026-04-03 10:48:25 -07: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 Migrate to ESM with esbuild and vitest (#243) 2026-04-03 10:48:25 -07:00
vitest.config.ts Migrate to ESM with esbuild and vitest (#243) 2026-04-03 10:48:25 -07: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.