A GitHub Action that setup Kubernetes tools (kubectl, kustomize, helm, kubeconform, conftest, yq, rancher, tilt, skaffold, kube-score) and cache them on the runner. It is like a typescript version of stefanprodan/kube-tools with no command input param, but as compared with it, it's very fast as it installs the tools asynchronously.
Parameter | Required | Default Value | Description |
---|---|---|---|
fail-fast |
false |
true |
the action immediately fails when it fails to download (ie. due to a bad version) |
arch-type |
false |
"" |
Optional. The processor architecture type of the tool binary to setup. The action will auto-detect the architecture (amd64 or arm64 ) and use it as appropriate at runtime. Specify the architecture type (amd64 or arm64 ) only if you need to force it. |
setup-tools |
false |
"" |
List of tool name to setup. By default, the action download and setup all supported Kubernetes tools. By specifying setup-tools you can choose which tools the action setup. Supported separator is return in multi-line string. Supported tools are kubectl , kustomize , helm , helmv3 , kubeval , conftest , yq , rancher , tilt , skaffold , kube-score |
kubectl |
false |
latest |
kubectl version or latest . kubectl versions can be found here |
kustomize |
false |
latest |
kustomize version or latest . kustomize versions can be found here |
helm |
false |
latest |
helm version or latest . helm versions can be found here |
kubeval |
false |
latest |
kubeval version (must be 0.16.1+) or latest . kubeval versions can be found here.NOTE: this parameter is deprecating as kubeval is no longer maintained. A good replacement is kubeconform. See also this for more details. |
kubeconform |
false |
latest |
kubeconform version or latest . kubeconform versions can be found here |
conftest |
false |
latest |
conftest version or latest . conftest versions can be found here |
yq |
false |
latest |
yq version or latest . yq versions can be found here |
rancher |
false |
latest |
Rancher CLI version or latest . Rancher CLI versions can be found here |
tilt |
false |
latest |
Tilt version or latest . Tilt versions can be found here |
skaffold |
false |
latest |
Skaffold version or latest . Skaffold versions can be found here |
kube-score |
false |
latest |
kube-score version or latest . kube-score versions can be found here |
Note
- Supported Environments:
Linux
- From
v0.7.0
, the action supports tool version 'v' prefix. Prior to v0.7.0, the action only accept the tool version without 'v' prefix but from v0.7.0 the action automatically add/remove the prefix as necessary - From
v0.13.0
, all tools uselatest
as the default version. However, usinglatest
can make builds non-reproducible, as the installed version may change over time. For stable and repeatable builds, it is recommended to specify exact versions
Parameter | Description |
---|---|
kubectl-path |
kubectl command path if the action setup the tool, otherwise empty string |
kustomize-path |
kustomize command path if the action setup the tool, otherwise empty string |
helm-path |
helm command path if the action setup the tool, otherwise empty string |
kubeval-path |
kubeval command path if the action setup the tool, otherwise empty string |
kubeconform-path |
kubeconform command path if the action setup the tool, otherwise empty string |
conftest-path |
conftest command path if the action setup the tool, otherwise empty string |
yq-path |
yq command path if the action setup the tool, otherwise empty string |
rancher-path |
rancher command path if the action setup the tool, otherwise empty string |
tilt-path |
rancher command path if the action setup the tool, otherwise empty string |
skaffold-path |
rancher command path if the action setup the tool, otherwise empty string |
kube-score-path: |
rancher command path if the action setup the tool, otherwise empty string |
Pinned versions (reproducible):
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: yokawasa/action-setup-kube-tools@v0.13.0
with:
kubectl: '1.25'
kustomize: '5.0.0'
helm: '3.11.1'
kubeconform: '0.5.0'
conftest: '0.39.0'
rancher: '2.7.0'
tilt: '0.31.2'
skaffold: '2.1.0'
kube-score: '1.16.1'
- run: |
kubectl version --client
kustomize version
helm version
kubeconform -v
conftest --version
yq --version
rancher --version
tilt version
skaffold version
kube-score version
Default behavior (latest) — no inputs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: yokawasa/action-setup-kube-tools@v0.13.0
- run: |
kubectl version --client
kustomize version
helm version
kubeconform -v
conftest --version
yq --version
rancher --version
tilt version
skaffold version
kube-score version
Selecting tools with default latest versions (using setup-tools
):
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: yokawasa/action-setup-kube-tools@v0.13.0
with:
setup-tools: |
kubectl
helm
kustomize
skaffold
- run: |
kubectl version --client
kustomize version
helm version
skaffold version
Architecture is automatically detected on the runner (amd64 or arm64). You can optionally force it by specifying arch-type: 'amd64'
or arch-type: 'arm64'
.
test:
steps:
- uses: actions/checkout@v4
- uses: yokawasa/action-setup-kube-tools@v0.13.0
with:
# arch-type is optional; uncomment to force arm64
# arch-type: 'arm64'
setup-tools: |
kubectl
helm
kustomize
skaffold
- run: |
kubectl version --client
kustomize version
helm version
skaffold version
Explicit latest inputs (optional):
```yaml
steps:
- uses: actions/checkout@v4
- uses: yokawasa/action-setup-kube-tools@v0.13.0
with:
kubectl: latest
helm: latest
kustomize: latest
skaffold: latest
Note: Using latest
makes builds non-reproducible since versions can change over time. Prefer pinning exact versions for stability.
Install the dependencies
npm install
Build the typescript and package it for distribution by running ncc
npm run build && npm run format && npm run lint && npm run pack
Finally push the results
git add dist
git commit -a -m "prod dependencies"
git push origin releases/v0.13.X
- https://kubernetes.io/releases/
- https://github.com/kubernetes-sigs/kustomize/releases
- https://github.com/helm/helm/releases
- https://helm.sh/docs/topics/version_skew/
- https://github.com/instrumenta/kubeval/releases
- https://github.com/open-policy-agent/conftest/releases
- https://github.com/mikefarah/yq/releases
- https://github.com/rancher/cli/releases
- https://github.com/tilt-dev/tilt/releases
- https://github.com/GoogleContainerTools/skaffold/releases
- https://github.com/zegl/kube-score/releases
Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/action-setup-kube-tools
Please see the list of releases for information on changes between releases.