-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
services.kubernetes does not allow other runtimes than docker #114247
Comments
Thanks for the issue! You're absolutely right. For the record, I'm working on the same right now, since we need it anyway for the kubernetes upgrade: #109275. In fact, Kubernetes is currently broken in nixos-unstable, since Docker 20.X removed dockershim. So yeah, tldr; we need this, and we'll also likely need to ship |
Something along the lines of this, maybe: johanot@046185c .. However, instead of using docker embedded containerd as default, I'd prefer plain containerd. Of course, still with option for opt-out of the defaults. |
Hi, just commenting here as this is relevant to a project I'm working on. The official CRI of Kubernetes is CRI-O. There's already a nixpkg for CRI-O so it would be great if there was native support, or better yet having it as the default. |
To be fair, there is also containerd as alternative to mention.
Yeah, I was working on it but then got side tracked. 🙃 |
I believe this issue should be closed or at least the title should change, in case we wanna repurpose the issue for implementing CRI-o support. :) |
I believe this issue was fixed with the introduction of These options were introduced after this issue was opened. I vote for closing this one. Feel free to open new issues if you experience problems with any CRI-compliant runtime. |
Ah yeah let's close this one. :) |
Great, thank you both. Glad to see progress being made on NixOS Kubernetes. Are there any examples of how to use a CRI other than containerd? Is it possible for Kubernetes to not pull in containerd if it's unused? |
NOTE: This is not strictly a bug, didn't know which issue template would be the most fitting.
Describe the bug
Kubernetes can use different container runtimes, one of them being docker [1]. The support for docker has been deprecated in kubernetes [2] so while it technically still can be used, it will be a common setup to use containerd instead.
The
services.kubernetes
service has no option to set a runtime, but instead sets up docker whenkubelet.enable
is true.This makes the service basically unusable if you want to use something other than docker. I would like to have support for containerd aswell. How much work would have to be done to support it? Is just adding an additional config option to select a backend enough? Are there other incompatibilities that have to be kept in mind?
I'm considering submitting a PR to add support for other runtimes, but I'm not sure how significant this change will have to be. If I can get some hints on the steps needed to add this to nixpkgs specifically, I'd be glad to help out (and scratch my own itch 😉 )
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There should be an option to select the runtime that kubernetes will use to start containers
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
[1] https://kubernetes.io/docs/setup/production-environment/container-runtimes/
[2] https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/
[3]
nixpkgs/nixos/modules/services/cluster/kubernetes/default.nix
Line 225 in c7d0dbe
Notify maintainers
@johanot @saschagrunert @rnhmjoj @worldofpeace @infinisil @offlinehacker
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result."x86_64-linux"
Linux 5.4.99, NixOS, 21.05.20210217.6b1057b (Okapi)
yes
yes
nix-env (Nix) 2.4pre20201205_a5d85d0
""
"home-manager"
/nix/store/srvplqq673sqd9vyfhyc5w1p88y1gfm4-source
Maintainer information:
The text was updated successfully, but these errors were encountered: