-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
nixos/kubernetes: replace docker shim with CRI-O #96084
Conversation
I'd suggest adding a nixos test for |
Alright I can do that before continuing here. 👍 |
f6ea533
to
133d752
Compare
Okay, so the bridge plugin (default) is working now, I'm just wondering what we wanna do with flannel. 🤔 |
Looks like that we would have to change the CRI-O |
86ff268
to
fc86af5
Compare
fc86af5
to
14adcce
Compare
This is ready for testing and review. PTAL @NixOS/podman @johanot @srhb @GrahamcOfBorg test kubernetes.dns |
14adcce
to
f89b6ca
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.
@saschagrunert two small question
Signed-off-by: Sascha Grunert <[email protected]>
f89b6ca
to
f937c72
Compare
Looks like there is some docker specific things in the kubernetes tests that probably need to be updated. |
Hey sascha! This sounds very interesting, but I do have some questions, the number one being: "Why?" 😁 Don't get me wrong, there's no love lost between myself and Docker, but the current kubernetes ecosystem, while trying to move in a separate direction, does tend to give it special status, the blessed "default" so to say. Why should we move away from that? That said, I'm definitely amenable to removing at least the special status of dockerized kubernetes in NixOS, making it up to the user to decide on their container runtime of choice. However, what about current users? I'm not very keen on making an, in the grand scale, "exotic" runtime the default. I'm sure we can work it out, but for instance our production cluster is currently docker, and we should try to figure out a migration strategy for users like us, unless we really decide to break everything for users, in which case we should at least have a good reason and document it thoroughly in the 21.03 release notes. Looking forward to hearing your inputs. I really don't want to sound too pessimistic here; like I said I'm really not a fan of docker as such, but I think we should try and figure out some coherent goals here, so we can make a realistic game plan. |
No worries I think the concerns are appropriate. The main reason for me personally was that I see docker and Kubernetes as two different things. Docker is the development tool which a much broader set of features than required to run Kubernetes. There is in-tree dockershim in Kubernetes, which is another set of glue code to make them work together. The container runtime interface (CRI) has been developed to have exchangeable runtime implementations which follow a common standard. Right now we have two main runtimes available: containerd (originates historically from docker/moby) and CRI-O. Later on we could make them switch-able by configuration. The dockershim will be deprecated and is going to be removed from Kubernetes if the corresponding KEP will be implemented:
Yeah I thought about making it configurable, which definitely would increase the complexity of the derivation, but should work in general. |
Dockershim beeing deprecated in kubernetes sounds like a strong argument to me. |
I tend to agree with @saschagrunert and @Mic92 but indeed @srhb, having a migration path (so having a way for the current user to not get broken) is most likely required 👼. Making it configurable with a default to docker to start and go on a deprecation path seems the right thing to do, even if it temporarly increase the complexity of the derivation. Small note, I wouldn't call |
Sorry, I was being a bit contrary with "exotic" for the purpose of illustrating my concerns. 😁 I largely agree with everything else, including especially accepting the increased complexity in order to remain compatible. |
Sounds good, I'll rework this PR to make docker the default but be able to exchange the runtime |
EDIT: Ah, it was fixed by removing all my kubernetes stuff in /etc/kubernetes Unsure if the problem is on my end, but after applying this PR locally,
|
Let's close this PR for now, I know that there are ongoing efforts in replacing docker with a configurable variant (containerd and CRI-O). |
Motivation for this change
This replaces the default Kubernetes docker-shim with the more lightweight cri-o module.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)