Use nix-snapshotter as k3s' snapshotter and image service

Replace k3s' embedded containerd with Nix-managed one
Deploy test k8s with image from Nix store
This commit is contained in:
Pim Kunis 2024-06-24 23:31:06 +02:00
parent a62d854a0e
commit e7d75fbb21
5 changed files with 162 additions and 4 deletions

View file

@ -24,6 +24,26 @@ let
];
in
{
kubernetes.resources.pods.testje.spec = {
containers.redis = {
image = "nix:0/nix/store/5nmh9qawhbwinzxidafjlfw68wfkh0pj-nix-image-redis.tar";
args = [ "--protected-mode" "no" ];
ports = [{
name = "redis";
containerPort = 6379;
}];
};
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [{
matchExpressions = [{
key = "kubernetes.io/hostname";
operator = "In";
values = [ "atlas" ];
}];
}];
};
imports = [
./base.nix
./longhorn.nix