From 0a51eebcb016d31dfebc82a3ebd89e56a7ee8b81 Mon Sep 17 00:00:00 2001 From: NyxErinys Date: Wed, 27 May 2026 03:16:49 -0500 Subject: [PATCH] add exposed port --- modules/k3s/deployments/ubuntu-test.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/k3s/deployments/ubuntu-test.nix b/modules/k3s/deployments/ubuntu-test.nix index 69e34a5..443f767 100644 --- a/modules/k3s/deployments/ubuntu-test.nix +++ b/modules/k3s/deployments/ubuntu-test.nix @@ -20,6 +20,12 @@ name = "ubuntu-test"; image = "ubuntu:26.04"; command = [ "tail" "-f" "/dev/null" ]; + ports = [ + { + name = "test-port"; + containerPort = 80; + } + ]; volumeMounts = [ { mountPath = "/test"; @@ -60,5 +66,22 @@ }; }; } + { + apiVersion = "v1"; + kind = "Service"; + metadata.name = "test-service"; + spec = { + type = "NodePort"; + selector.app = "ubuntu-test"; + ports = [ + { + name = "test-port"; + portocol = "TCP"; + port = 80; + nodePort = 32767; + } + ]; + }; + } ]; } \ No newline at end of file