-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tutorial showing how to run CRI-O in kind #8170
Add tutorial showing how to run CRI-O in kind #8170
Conversation
@cri-o/cri-o-maintainers PTAL 🙏 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8170 +/- ##
==========================================
- Coverage 49.58% 49.54% -0.04%
==========================================
Files 153 153
Lines 16930 16961 +31
==========================================
+ Hits 8394 8404 +10
- Misses 7489 7510 +21
Partials 1047 1047 |
thanks! you've got some markdown lint failures |
@roman-kiselenko, given that it's based on your excellent blog post, feel free to ignore my suggestions for the changes to the way how "kind" is styled. |
07a5a0b
to
760e5c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. Amazing. Managed to create the cluster with the provided information.
One quick remark though; I have faced an issue with my configuration (I had docker configured to use buildx ...). I could not build the crio image if using buildx ...
Not sure if you want to highlight that.
Thanks again.
Awesome! We could keep this updated for newer versions on main branch and release branches will retain version specific instructions. |
|
||
<!-- markdownlint-disable MD013 --> | ||
```sh | ||
$ kind create cluster --image kindnode/crio:$CRIO_VERSION --config ./kind-crio.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use podman for running the cluster as an alternative to docker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK yes ... BUT generating the node and base images requires docker. Or used to require :)
Probably better if someone confirmed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, AFAIK, there is a lot of different options, and by leveraging KIND_EXPERIMENTAL_PROVIDER
variable, you can create a cluster with different runtimes:
- podman
- nerdctl.lima
- finch
- nerdctl
@maiqueb, what sort of issue shave you had? Any errors you can share we could have a look at? This might be something we want to fix, potentially. |
Sure thing @kwilczynski. The error happens when I try to build the CRIO img from the node image: ➜ new-cni-verbs-demo docker build --build-arg CRIO_VERSION=$CRIO_VERSION -t kindnode/crio:$CRIO_VERSION .
[+] Building 1.4s (2/2) FINISHED docker-container:kind-builder
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 977B 0.0s
=> ERROR [internal] load metadata for docker.io/kindest/node:latest 1.2s
------
> [internal] load metadata for docker.io/kindest/node:latest:
------
WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
Dockerfile:1
--------------------
1 | >>> FROM kindest/node:latest
2 |
3 | ARG CRIO_VERSION
--------------------
ERROR: failed to solve: kindest/node:latest: failed to resolve source metadata for docker.io/kindest/node:latest: docker.io/kindest/node:latest: not found
# I'm using buildx
➜ new-cni-verbs-demo cat ~/.docker/config.json
{
"auths": {},
"aliases": {
"builder": "buildx"
}
}# The weird thing IMO is the image is actually available in ➜ new-cni-verbs-demo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
...
kindest/node latest 7acfe6ceb949 28 hours ago 1.06GB
... This was "fixed" by ... not using buildx :) ➜ new-cni-verbs-demo mv ~/.docker/config.json ~/.docker/config.jsonBACKUP
➜ new-cni-verbs-demo docker build --build-arg CRIO_VERSION=$CRIO_VERSION -t kindnode/crio:$CRIO_VERSION .
[+] Building 0.3s (6/6) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 977B 0.0s
=> [internal] load metadata for docker.io/kindest/node:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [1/2] FROM docker.io/kindest/node:latest 0.0s
=> CACHED [2/2] RUN echo "Installing Packages ..." && apt-get clean && apt-get update -y && DEBIAN_FRONTEND=noninteractive apt 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:fe153b4a09c05031acc6dc4dc09ec5563df58f5d9332320b17a859918b0caf84 0.0s
=> => naming to docker.io/kindnode/crio:v1.30 I've also tried to use ➜ new-cni-verbs-demo mv ~/.docker/config.jsonBACKUP ~/.docker/config.json
➜ new-cni-verbs-demo docker build --build-arg CRIO_VERSION=$CRIO_VERSION --load -t kindnode/crio:$CRIO_VERSION .
[+] Building 0.6s (2/2) FINISHED docker-container:kind-builder
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 977B 0.0s
=> ERROR [internal] load metadata for docker.io/kindest/node:latest 0.4s
------
> [internal] load metadata for docker.io/kindest/node:latest:
------
Dockerfile:1
--------------------
1 | >>> FROM kindest/node:latest
2 |
3 | ARG CRIO_VERSION
--------------------
ERROR: failed to solve: kindest/node:latest: failed to resolve source metadata for docker.io/kindest/node:latest: docker.io/kindest/node:latest: not found |
Signed-off-by: roman-kiselenko <roman.kiselenko.dev@gmail.com>
760e5c7
to
1e12bed
Compare
@maiqueb Thank you for your tip; I've added the note about |
@maiqueb: changing LGTM is restricted to collaborators In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/approve LGTM, thank you! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, kwilczynski, maiqueb, roman-kiselenko The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
Small tutorial: How to run CRI-O as container runtime in kind.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
None
Does this PR introduce a user-facing change?