add exposed port
This commit is contained in:
parent
9069837f2f
commit
0a51eebcb0
1 changed files with 23 additions and 0 deletions
|
|
@ -20,6 +20,12 @@
|
||||||
name = "ubuntu-test";
|
name = "ubuntu-test";
|
||||||
image = "ubuntu:26.04";
|
image = "ubuntu:26.04";
|
||||||
command = [ "tail" "-f" "/dev/null" ];
|
command = [ "tail" "-f" "/dev/null" ];
|
||||||
|
ports = [
|
||||||
|
{
|
||||||
|
name = "test-port";
|
||||||
|
containerPort = 80;
|
||||||
|
}
|
||||||
|
];
|
||||||
volumeMounts = [
|
volumeMounts = [
|
||||||
{
|
{
|
||||||
mountPath = "/test";
|
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;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue