建集群必须有支持 Linux 容器的 Docker,macOS/Windows runner 上只能设 install_only: true;registry 与 cloud_provider 仅限 Linux,非 Linux 会直接报错;用 config 自定义配置时需自行在节点启用 /etc/containerd/certs.d 才能配合本地仓库;在 job 容器内运行时可能需设 KIND_EXPERIMENTAL_DOCKER_NETWORK 否则 API 连接被拒。
kind-action
helmApache-2.0活跃维护在 GitHub Actions 里一键拉起 kind 的 Kubernetes 集群,方便跑 Helm chart 测试和 CI 集成验证,不用再手动搭环境。
A GitHub Action for Kubernetes IN Docker - local clusters for testing Kubernetes
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1README 未说明显存等硬件要求;集群创建依赖 Docker(需支持 Linux 容器),GitHub 托管 ubuntu-latest 满足;macOS/Windows 托管 runner 无 Linux 容器 Docker,只能 install_only 装二进制。
在 GitHub Actions 里用 Docker 起 kind 本地 K8s 集群,给 CI 跑测试用
在 GitHub Actions 里一键拉起 kind 的 Kubernetes 集群,方便跑 Helm chart 测试和 CI 集成验证,不用再手动搭环境。
核心能力
- 自动安装 kind 与 kubectl 并加入 PATH
- 按需创建 kind 集群并等待控制面就绪
- 可配置节点镜像、集群名与 kind 配置文件
- 可选启用不安全本地镜像仓库并暴露端口
- 支持 install_only 只装二进制不建集群
容易踩的坑
- v1.15.2最新正式版2026-11-04 · 2026-11-04 10:25 UTC
What's Changed
- feat(#38): add support for windows and mac os runners by @Jeff-Tian in https://github.com/helm/kind-action/pull/159
- docs: explain kind networking in job containers by @cpanato in https://github.com/helm/kind-action/pull/172
- fix: validate kind checksum downloads by @cpanato in https://github.com/helm/kind-action/pull/171
New Contributors
- @Jeff-Tian made their first contribution in https://github.com/helm/kind-action/pull/159
Full Changelog: https://github.com/helm/kind-action/compare/v1.15.1...v1.15.2
- v1.15.12026-10-06 · 2026-10-06 10:01 UTC
查看更新说明
What's Changed
- feat: add version_file input to read the kind version from a file by @somaz94 in https://github.com/helm/kind-action/pull/162
- chore: bump kubectl to v1.37.1 and cloud-provider-kind to v0.12.0 by @cpanato in https://github.com/helm/kind-action/pull/170
New Contributors
- @somaz94 made their first contribution in https://github.com/helm/kind-action/pull/162
Full Changelog: https://github.com/helm/kind-action/compare/v1.15.0...v1.15.1
- v1.15.02026-09-02 · 2026-09-02 15:53 UTC
查看更新说明
What's Changed
- clean up ci by @cpanato in https://github.com/helm/kind-action/pull/158
- Bump actions/checkout from 6.0.2 to 6.0.3 in the actions group by @dependabot[bot] in https://github.com/helm/kind-action/pull/161
- fix: propagate registry_port to container and containerd by @Bisman-Singh in https://github.com/helm/kind-action/pull/160
- fix: add curl retry flags to download calls by @kaovilai in https://github.com/helm/kind-action/pull/165
- Bump actions/checkout from 6.0.3 to 7.0.1 by @dependabot[bot] in https://github.com/helm/kind-action/pull/166
- chore: bump default kind and kubectl by @yurnov in https://github.com/helm/kind-action/pull/169
- Report url that could not be downloaded by @jsoref in https://github.com/helm/kind-action/pull/167
New Contributors
- @Bisman-Singh made their first contribution in https://github.com/helm/kind-action/pull/160
- @kaovilai made their first contribution in https://github.com/helm/kind-action/pull/165
- @yurnov made their first contribution in https://github.com/helm/kind-action/pull/169
- @jsoref made their first contribution in https://github.com/helm/kind-action/pull/167
Full Changelog: https://github.com/helm/kind-action/compare/v1.14.0...v1.15.0
- v1.14.02026-02-17 · 2026-02-17 14:51 UTC
查看更新说明
What's Changed
- Bump actions/checkout from 5.0.0 to 6.0.1 by @dependabot[bot] in https://github.com/helm/kind-action/pull/153
- bump kind to v0.31.0 and k8s to v1.35.0 by @MrFreezeex in https://github.com/helm/kind-action/pull/155
- Bump actions/checkout from 6.0.1 to 6.0.2 in the actions group by @dependabot[bot] in https://github.com/helm/kind-action/pull/156
New Contributors
- @MrFreezeex made their first contribution in https://github.com/helm/kind-action/pull/155
Full Changelog: https://github.com/helm/kind-action/compare/v1...v1.14.0
- v1.13.02025-11-03 · 2025-11-03 10:07 UTC
查看更新说明
What's Changed
- chore: verify sha256sum of kubectl by @felix-kaestner in https://github.com/helm/kind-action/pull/134
- Load GITHUB_PATH in PATH to use correct binaries when creating registry by @gotha in https://github.com/helm/kind-action/pull/133
- feat: Add cloud provider by @waltermity in https://github.com/helm/kind-action/pull/135
- chore: bump kind to v0.29.0 by @pmalek in https://github.com/helm/kind-action/pull/144
- Bump actions/checkout from 4.2.2 to 5.0.0 by @dependabot[bot] in https://github.com/helm/kind-action/pull/145
- bug: respect 'install_only' action input value by @mszostok in https://github.com/helm/kind-action/pull/147
- bump kind and kubectl and also nodejs by @cpanato in https://github.com/helm/kind-action/pull/150
New Contributors
- @felix-kaestner made their first contribution in https://github.com/helm/kind-action/pull/134
- @gotha made their first contribution in https://github.com/helm/kind-action/pull/133
- @waltermity made their first contribution in https://github.com/helm/kind-action/pull/135
- @pmalek made their first contribution in https://github.com/helm/kind-action/pull/144
- @mszostok made their first contribution in https://github.com/helm/kind-action/pull/147
Full Changelog: https://github.com/helm/kind-action/compare/v1...v1.13.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Kind Action
A GitHub Action for Kubernetes IN Docker - local clusters for testing Kubernetes using kubernetes-sigs/kind.
Usage
Pre-requisites
Create a workflow YAML file in your .github/workflows directory. An example workflow is available below.
For more information, reference the GitHub Help Documentation for Creating a workflow file.
Supported Operating Systems
The action can install kind and kubectl on Linux, macOS, and Windows runners.
- Cluster creation requires Docker.
kindcreates Kubernetes clusters using Docker containers with Linux node images, so a cluster can only be created where Docker (with Linux container support) is available. GitHub-hostedubuntu-latestrunners satisfy this. - Hosted macOS and Windows runners do not provide Docker for Linux containers. On these runners use
install_only: trueto install thekindandkubectlbinaries without creating a cluster (the binaries are still added toPATH). registryandcloud_providerare Linux-only. Enabling either on a non-Linux runner fails with a clear error, since they rely on Linux-specific tools and paths (sudo,/etc/hosts,/usr/local/bin, Docker networking).
Running in a GitHub Actions job container
When a job runs inside a container, the job container and the kind control-plane
container may not share a network. If the cluster is created but API requests
fail with connection refused, configure kind to use the job's Docker network
and address the control plane by its container name. The job container must
already have access to a Docker daemon.
For example, set the network used by the job container and provide a kind configuration file:
# kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
apiServerAddress: "127.0.0.1"
apiServerPort: 6443
jobs:
test:
runs-on: ubuntu-latest
container:
image: your-image-with-docker-access
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: helm/[email protected]
env:
KIND_EXPERIMENTAL_DOCKER_NETWORK: ${{ job.container.network }}
with:
cluster_name: kind
config: ./kind-config.yaml
- name: Verify cluster
run: |
kubectl config set-cluster kind-kind --server=https://kind-control-plane:6443
kubectl cluster-info
job.container.network must resolve to the Docker network shared with the
runner's Docker daemon. If the runner does not expose that network name, set
KIND_EXPERIMENTAL_DOCKER_NETWORK to the network name available to the job
container instead. The kubectl config set-cluster command assumes the
cluster_name is kind; for another name, use the corresponding kind-<name>
context and node container name. The CI workflow exercises this setup in the
test-with-job-container job.
Inputs
For more information on inputs, see the API Documentation
version: The kind version to use (default:v0.33.0)version_file: The path to a file containing the kind version to use. Supports the asdf.tool-versionslayout (thekindentry) and plain version files. The version is used as-is, so include the leadingv(for examplekind v0.33.0). Takes precedence overversionwhen set.config: The path to the kind config filenode_image: The Docker image for the cluster nodescluster_name: The name of the cluster to create (default:chart-testing)wait: The duration to wait for the control plane to become ready (default:60s)verbosity: info log verbosity, higher value produces more outputkubectl_version: The kubectl version to use (default:v1.37.1)registry: Whether to configure an insecure local registry (default:false)registry_image: The registry image to use (default:registry:2)registry_name: The registry name to use (default:kind-registry)registry_port: The local port used to bind the registry (default:5000)registry_enable_delete: Enable delete operations on the registry (default:false)install_only: Skips cluster creation, only install kind (default:false)ignore_failed_clean: Whether to ignore the post delete cluster action failing (default:false)cloud_provider: Whether to use cloud provider loadbalancer (default:false)
Example Workflow
Create a workflow (eg: .github/workflows/create-cluster.yml):
name: Create Cluster
on: pull_request
jobs:
create-cluster:
runs-on: ubuntu-latest
steps:
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
This uses @helm/kind-action GitHub Action to spin up a kind Kubernetes cluster on every Pull Request. See @helm/chart-testing-action for a more practical example.
Configuring Local Registry
Create a workflow (eg: .github/workflows/create-cluster-with-registry.yml):
name: Create Cluster with Registry
on: pull_request
jobs:
create-cluster-with-registry:
runs-on: ubuntu-latest
steps:
- name: Kubernetes KinD Cluster
id: kind
uses: helm/kind-action@v1
with:
registry: true
registry_name: my-registry
registry_port: 5001
registry_enable_delete: true
This configures the cluster to use an insecure local registry at my-registry:5001 and exposes it on the runner host at port 5001. Use localhost:5001 for Docker commands on the runner host, and the LOCAL_REGISTRY output (i.e. ${{ steps.kind.outputs.LOCAL_REGISTRY }}) for image references used by workloads inside the cluster.
Note: If config option is used, you must manually configure the cluster nodes with registry config dir enabled at /etc/containerd/certs.d. For example:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
Code of conduct
Participation in the Helm community is governed by the Code of Conduct.