add k8s deployment for blog

This commit is contained in:
Pim Kunis 2024-04-22 23:46:59 +02:00
parent 44013d3a78
commit d833b055ee
2 changed files with 41 additions and 0 deletions

View file

@ -24,5 +24,6 @@
./custom/ingress.nix
./custom/nfs-volume.nix
./traefik.nix
./blog.nix
];
}

40
kubenix-modules/blog.nix Normal file
View file

@ -0,0 +1,40 @@
{
kubernetes.resources = {
deployments.blog = {
metadata.labels.app = "blog";
spec = {
selector.matchLabels.app = "blog";
template = {
metadata.labels.app = "blog";
spec = {
containers.blog = {
image = "git.kun.is/pim/static:test3";
ports.web.containerPort = 80;
};
};
};
};
};
services.blog.spec = {
selector.app = "blog";
ports.web = {
port = 80;
targetPort = "web";
};
};
};
lab.ingresses.blog = {
host = "pim.kun.is";
service = {
name = "blog";
portName = "web";
};
};
}