Skip to content

Commit d984c2e

Browse files
authored
Merge pull request #254 from engineerd/chore/revamp-readme
2 parents 77f76b5 + 30e7a19 commit d984c2e

File tree

1 file changed

+20
-33
lines changed

1 file changed

+20
-33
lines changed

README.md

+20-33
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
Setup [KinD (Kubernetes in Docker)](https://kind.sigs.k8s.io/) with a single
44
GitHub Action!
55

6-
> Because of a [deprecation in the GitHub Actions environment][gh-actions-path],
7-
> versions lower than v0.5.0 will no longer work properly. See [this
8-
> issue][path-issue] for more details.
9-
106
> This action assumes a Linux environment (amd64 or arm64 architecture), and will _not_ work on Windows or
117
> MacOS agents.
128
@@ -19,30 +15,42 @@ jobs:
1915
runs-on: ubuntu-latest
2016
steps:
2117
- uses: actions/checkout@master
22-
- uses: engineerd/setup-kind@v0.5.0
18+
- uses: engineerd/setup-kind@v0.6.0
19+
with:
20+
version: "v0.24.0"
2321
- name: Testing
2422
run: |
2523
kubectl cluster-info
24+
kubectl version
2625
kubectl get pods -n kube-system
27-
echo "current-context:" $(kubectl config current-context)
28-
echo "environment-kubeconfig:" ${KUBECONFIG}
2926
```
3027
31-
> Note: KUBECONFIG is automatically merged after cluster creation starting with
32-
> version 0.6 of Kind. See [this document for a detailed migration
33-
> guide][kind-kubeconfig]
28+
This will configure KinD and start a cluster in your local GitHub Action:
29+
30+
```
31+
downloading kind from https://github.com/kubernetes-sigs/kind/releases/download/v0.24.0/kind-linux-amd64
32+
/opt/hostedtoolcache/kind/0.24.0/x64/kind create cluster --name kind --wait 300s
33+
Creating cluster "kind" ...
34+
✓ Ensuring node image (kindest/node:v1.31.0) 🖼
35+
✓ Preparing nodes 📦
36+
✓ Writing configuration 📜
37+
✓ Starting control-plane 🕹️
38+
• Installing CNI 🔌 ...
39+
✓ Installing StorageClass 💾
40+
• Ready after 17s 💚
41+
```
3442

3543
> Note: GitHub Actions workers come pre-configured with `kubectl`.
3644
3745
The following arguments can be configured on the job using the `with` keyword
3846
(see example above). Currently, possible inputs are all the flags for
3947
`kind cluster create`, with the additional version, which sets the Kind version
4048
to download and `skipClusterCreation`, which when present, skips creating the
41-
cluster (the Kind tools is configured in the path).
49+
cluster (the KinD tool is configured in the path).
4250

4351
Optional inputs:
4452

45-
- `version`: version of Kind to use (default `"v0.11.1"`)
53+
- `version`: version of Kind to use (default `"v0.24.0"`)
4654
- `config`: path (relative to the root of the repository) to a kind config file.
4755
If omitted, a default 1-node cluster will be created
4856
- `image`: node Docker image to use for booting the cluster.
@@ -56,27 +64,6 @@ Optional inputs:
5664
- `verbosity`: numeric log verbosity, (info = 0, debug = 3, trace = 2147483647) (default `"0"`)
5765
- `quiet`: silence all stderr output (default `"false"`)
5866

59-
Example using optional inputs:
60-
61-
```yaml
62-
name: "Create cluster using KinD"
63-
on: [pull_request, push]
64-
65-
jobs:
66-
kind:
67-
runs-on: ubuntu-latest
68-
steps:
69-
- uses: actions/checkout@master
70-
- uses: engineerd/setup-kind@v0.5.0
71-
with:
72-
version: "v0.11.1"
73-
- name: Testing
74-
run: |
75-
kubectl cluster-info
76-
kubectl get pods -n kube-system
77-
echo "current-context:" $(kubectl config current-context)
78-
echo "environment-kubeconfig:" ${KUBECONFIG}
79-
```
8067

8168
[kind-kubeconfig]: https://github.com/kubernetes-sigs/kind/issues/1060
8269
[gh-actions-path]:

0 commit comments

Comments
 (0)