KinD (Kubernetes in Docker) Action - GitHub Marketplace (original) (raw)

@engineerd/setup-kind

Setup KinD (Kubernetes in Docker) with a single GitHub Action!

This action assumes a Linux environment (amd64 or arm64 architecture), and will not work on Windows or MacOS agents.

name: "Create cluster using KinD" on: [pull_request, push]

jobs: kind: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - uses: engineerd/setup-kind@v0.6.0 with: version: "v0.24.0" - name: Testing run: | kubectl cluster-info kubectl version kubectl get pods -n kube-system

This will configure KinD and start a cluster in your local GitHub Action:

downloading kind from https://github.com/kubernetes-sigs/kind/releases/download/v0.24.0/kind-linux-amd64
/opt/hostedtoolcache/kind/0.24.0/x64/kind create cluster --name kind --wait 300s
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.31.0) đŸ–ŧ
 ✓ Preparing nodes đŸ“Ļ 
 ✓ Writing configuration 📜
 ✓ Starting control-plane đŸ•šī¸
 â€ĸ Installing CNI 🔌  ...
 ✓ Installing StorageClass 💾
 â€ĸ Ready after 17s 💚

Note: GitHub Actions workers come pre-configured with kubectl.

The following arguments can be configured on the job using the with keyword (see example above). Currently, possible inputs are all the flags forkind cluster create, with the additional version, which sets the Kind version to download and skipClusterCreation, which when present, skips creating the cluster (the KinD tool is configured in the path).

Optional inputs: