Skip to content

Commit

Permalink
update docs for nerdctl support
Browse files Browse the repository at this point in the history
Co-authored-by: Sean McGinnis <[email protected]>
Signed-off-by: Kay Yan <[email protected]>
  • Loading branch information
yankay and stmcginnis committed Feb 28, 2024
1 parent 7c3e01f commit 974fa25
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ labels: kind/bug
**Environment:**

- kind version: (use `kind version`):
- Runtime info: (use `docker info` or `podman info`):
- Runtime info: (use `docker info`, `podman info` or `nerdctl info`):
- OS (e.g. from `/etc/os-release`):
- Kubernetes version: (use `kubectl version`):
- Any proxies or other special environment settings?:
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
kind is a tool for running local Kubernetes clusters using Docker container "nodes".
kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.

If you have [go] 1.16+ and [docker] or [podman] installed `go install sigs.k8s.io/[email protected] && kind create cluster` is all you need!
If you have [go] 1.16+ and [docker], [podman] or [nerdctl] installed `go install sigs.k8s.io/[email protected] && kind create cluster` is all you need!

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

Expand Down Expand Up @@ -145,6 +145,7 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of
[go-supported]: https://golang.org/doc/devel/release.html#policy
[docker]: https://www.docker.com/
[podman]: https://podman.io/
[nerdctl]: https://github.com/containerd/nerdctl
[community page]: https://kubernetes.io/community/
[Kubernetes Code of Conduct]: code-of-conduct.md
[Go Report Card Badge]: https://goreportcard.com/badge/sigs.k8s.io/kind
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ var NoNodeProviderDetectedError = errors.NewWithoutStack("failed to detect any s
// Pass the returned ProviderOption to NewProvider to pass the auto-detect Docker
// or Podman option explicitly (in the future there will be more options)
//
// NOTE: The kind *cli* also checks `KIND_EXPERIMENTAL_PROVIDER` for "podman" or
// "docker" currently and does not auto-detect / respects this if set.
// NOTE: The kind *cli* also checks `KIND_EXPERIMENTAL_PROVIDER` for "podman",
// "nerctl" or "docker" currently and does not auto-detect / respects this if set.
//
// This will be replaced with some other mechanism in the future (likely when
// podman support is GA), in the meantime though your tool may wish to match this.
Expand Down
3 changes: 2 additions & 1 deletion site/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: kind
[kind] is a tool for running local Kubernetes clusters using Docker container "nodes".
kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.

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!
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!

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

Expand Down Expand Up @@ -95,6 +95,7 @@ Participation in the Kubernetes community is governed by the [Kubernetes Code of
[go-supported]: https://golang.org/doc/devel/release.html#policy
[docker]: https://www.docker.com/
[podman]: https://podman.io/
[nerdctl]: https://github.com/containerd/nerdctl
[community page]: https://kubernetes.io/community/
[Kubernetes Code of Conduct]: https://github.com/kubernetes/community/blob/master/code-of-conduct.md
[Go Report Card Badge]: https://goreportcard.com/badge/sigs.k8s.io/kind
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ with kind at HEAD to have the latest fixes for running bleeding edge Kubernetes.
We ensure that the tests continue to work in the kind repo before merging any code changes.

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

### Configuration

Expand Down
6 changes: 6 additions & 0 deletions site/content/docs/user/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ wait for 30 seconds, do `--wait 30s`, for 5 minutes do `--wait 5m`, etc.

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

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
select the runtime.

## Interacting With Your Cluster

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

[modules]: https://github.com/golang/go/wiki/Modules
[go-supported]: https://golang.org/doc/devel/release.html#policy
[docker]: https://www.docker.com/
[podman]: https://podman.io/
[nerdctl]: https://github.com/containerd/nerdctl
[known issues]: /docs/user/known-issues
[releases]: https://github.com/kubernetes-sigs/kind/releases
[node image]: /docs/design/node-image
Expand Down
10 changes: 9 additions & 1 deletion site/content/docs/user/rootless.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ menu:
identifier: "rootless"
weight: 3
---
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.
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.

## Provider requirements
- Docker: 20.10 or later
- Podman: 3.0 or later
- nerdctl: 1.7 or later

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

## Creating a kind cluster with Rootless nerdctl

To create a kind cluster with nerdctl, just run:
```console
$ KIND_EXPERIMENTAL_PROVIDER=nerdctl kind create cluster
```

## Tips
- To enable OOM watching, allow `dmesg` by running `sysctl -w kernel.dmesg_restrict=0`.

0 comments on commit 974fa25

Please sign in to comment.