by hinshun · 3y ago · 0 comments
I have tested with EKS, and you should be able to use nix-snapshotter with GKE too. May be able to put together some docs for that later.
In the meantime, see this for running a different snapshotter on EKS: https://blog.realvarez.com/using-estargz-to-reduce-container...
I'm a k8s novice, but would there be a way to run the nix daemon/cache in a semi-persistent pod on each node, and then "attach" it to the actual worker pods?
I got the impression that it uses the node's nix daemon.
From the project readme's FAQ https://github.com/pdtpartners/nix-snapshotter#faq
> What's the difference between this and a nix-in-docker?
> If you run nix inside a container (e.g. nixos/nix or nixpkgs/nix-flake) then you are indeed fetching packages using the Nix store. However, each container will have its own Nix store instead of de-duplicating at the host level.
> nix-snapshotter is intended to live on the host system (sibling to containerd and/or kubelet) so that multiple containers running different images can share the underlying packages from the same Nix store.
I didn’t mean running nix-snapshotter as a Kubernetes resource because then there’s a chicken & egg problem. Kubernetes needs nix-snapshotter image service to resolve the nix-snapshotter image.