Skip to content

Commit 974fa25

Browse files
yankaystmcginnis
andcommitted
update docs for nerdctl support
Co-authored-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Kay Yan <kay.yan@daocloud.io>
1 parent 7c3e01f commit 974fa25

7 files changed

Lines changed: 23 additions & 7 deletions

File tree

‎.github/ISSUE_TEMPLATE/bug-report.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ labels: kind/bug
2121
**Environment:**
2222

2323
- kind version: (use `kind version`):
24-
- Runtime info: (use `docker info` or `podman info`):
24+
- Runtime info: (use `docker info`, `podman info` or `nerdctl info`):
2525
- OS (e.g. from `/etc/os-release`):
2626
- Kubernetes version: (use `kubectl version`):
2727
- Any proxies or other special environment settings?:

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
kind is a tool for running local Kubernetes clusters using Docker container "nodes".
66
kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.
77

8-
If you have [go] 1.16+ and [docker] or [podman] installed `go install sigs.k8s.io/kind@v0.22.0 && kind create cluster` is all you need!
8+
If you have [go] 1.16+ and [docker], [podman] or [nerdctl] installed `go install sigs.k8s.io/kind@v0.22.0 && kind create cluster` is all you need!
99

1010
![](site/static/images/kind-create-cluster.png)
1111

@@ -145,6 +145,7 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of
145145
[go-supported]: https://golang.org/doc/devel/release.html#policy
146146
[docker]: https://www.docker.com/
147147
[podman]: https://podman.io/
148+
[nerdctl]: https://github.com/containerd/nerdctl
148149
[community page]: https://kubernetes.io/community/
149150
[Kubernetes Code of Conduct]: code-of-conduct.md
150151
[Go Report Card Badge]: https://goreportcard.com/badge/sigs.k8s.io/kind

‎pkg/cluster/provider.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ var NoNodeProviderDetectedError = errors.NewWithoutStack("failed to detect any s
103103
// Pass the returned ProviderOption to NewProvider to pass the auto-detect Docker
104104
// or Podman option explicitly (in the future there will be more options)
105105
//
106-
// NOTE: The kind *cli* also checks `KIND_EXPERIMENTAL_PROVIDER` for "podman" or
107-
// "docker" currently and does not auto-detect / respects this if set.
106+
// NOTE: The kind *cli* also checks `KIND_EXPERIMENTAL_PROVIDER` for "podman",
107+
// "nerctl" or "docker" currently and does not auto-detect / respects this if set.
108108
//
109109
// This will be replaced with some other mechanism in the future (likely when
110110
// podman support is GA), in the meantime though your tool may wish to match this.

‎site/content/_index.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: kind
66
[kind] is a tool for running local Kubernetes clusters using Docker container "nodes".
77
kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.
88

9-
If you have [go] 1.16+ and [docker] or [podman] installed `go install sigs.k8s.io/kind@{{< stableVersion >}} && kind create cluster` is all you need!
9+
If you have [go] 1.16+ and [docker], [podman] or [nerdctl] installed `go install sigs.k8s.io/kind@{{< stableVersion >}} && kind create cluster` is all you need!
1010

1111
<img src="images/kind-create-cluster.png" />
1212

@@ -95,6 +95,7 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of
9595
[go-supported]: https://golang.org/doc/devel/release.html#policy
9696
[docker]: https://www.docker.com/
9797
[podman]: https://podman.io/
98+
[nerdctl]: https://github.com/containerd/nerdctl
9899
[community page]: https://kubernetes.io/community/
99100
[Kubernetes Code of Conduct]: https://github.com/kubernetes/community/blob/master/code-of-conduct.md
100101
[Go Report Card Badge]: https://goreportcard.com/badge/sigs.k8s.io/kind

‎site/content/docs/contributing/development.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ with kind at HEAD to have the latest fixes for running bleeding edge Kubernetes.
153153
We ensure that the tests continue to work in the kind repo before merging any code changes.
154154

155155
We also have some limited usage experiments with [GitHub Actions], currently
156-
only for testing `podman` support in kind.
156+
only for testing `podman` or `nerdctl` support in kind.
157157

158158
### Configuration
159159

‎site/content/docs/user/quick-start.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ wait for 30 seconds, do `--wait 30s`, for 5 minutes do `--wait 5m`, etc.
144144

145145
More usage can be discovered with `kind create cluster --help`.
146146

147+
The kind can auto-detect the [docker], [podman], or [nerdctl] installed and choose the available one. If you want to turn off the auto-detect, use the environment variable `KIND_EXPERIMENTAL_PROVIDER=docker`, `KIND_EXPERIMENTAL_PROVIDER=podman` or `KIND_EXPERIMENTAL_PROVIDER=nerdctl` to
148+
select the runtime.
149+
147150
## Interacting With Your Cluster
148151

149152
After [creating a cluster](#creating-a-cluster), you can use [kubectl][kubectl]
@@ -433,6 +436,9 @@ kind, the Kubernetes cluster itself, etc.
433436

434437
[modules]: https://github.com/golang/go/wiki/Modules
435438
[go-supported]: https://golang.org/doc/devel/release.html#policy
439+
[docker]: https://www.docker.com/
440+
[podman]: https://podman.io/
441+
[nerdctl]: https://github.com/containerd/nerdctl
436442
[known issues]: /docs/user/known-issues
437443
[releases]: https://github.com/kubernetes-sigs/kind/releases
438444
[node image]: /docs/design/node-image

‎site/content/docs/user/rootless.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ menu:
66
identifier: "rootless"
77
weight: 3
88
---
9-
Starting with kind 0.11.0, [Rootless Docker](https://docs.docker.com/go/rootless/) and [Rootless Podman](https://github.com/containers/podman/blob/master/docs/tutorials/rootless_tutorial.md) can be used as the node provider of kind.
9+
Starting with kind 0.11.0, [Rootless Docker](https://docs.docker.com/go/rootless/), [Rootless Podman](https://github.com/containers/podman/blob/master/docs/tutorials/rootless_tutorial.md) and [Rootless nerdctl](https://github.com/containerd/nerdctl/blob/main/docs/rootless.md) can be used as the node provider of kind.
1010

1111
## Provider requirements
1212
- Docker: 20.10 or later
1313
- Podman: 3.0 or later
14+
- nerdctl: 1.7 or later
1415

1516
## Host requirements
1617
The host needs to be running with cgroup v2.
@@ -80,5 +81,12 @@ On some distributions, you might need to use systemd-run to start kind into its
8081
$ systemd-run --scope --user kind create cluster
8182
```
8283

84+
## Creating a kind cluster with Rootless nerdctl
85+
86+
To create a kind cluster with nerdctl, just run:
87+
```console
88+
$ KIND_EXPERIMENTAL_PROVIDER=nerdctl kind create cluster
89+
```
90+
8391
## Tips
8492
- To enable OOM watching, allow `dmesg` by running `sysctl -w kernel.dmesg_restrict=0`.

0 commit comments

Comments
 (0)