Use named container ports

This commit is contained in:
Dreaded_X 2025-04-21 02:36:59 +02:00
parent 8cafe2b3ca
commit f0bf60c78a
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4
2 changed files with 6 additions and 3 deletions

View File

@ -31,8 +31,10 @@ spec:
cpu: 50m cpu: 50m
memory: 100Mi memory: 100Mi
ports: ports:
- containerPort: 3000 - name: ssh
- containerPort: 2222 containerPort: 2222
- name: http
containerPort: 3000
volumeMounts: volumeMounts:
- name: credentials - name: credentials
readOnly: true readOnly: true

View File

@ -6,6 +6,7 @@ spec:
ports: ports:
- name: http - name: http
port: 3000 port: 3000
targetPort: http
selector: selector:
app: siranga app: siranga
--- ---
@ -20,6 +21,6 @@ spec:
ports: ports:
- name: ssh - name: ssh
port: 22 port: 22
targetPort: 2222 targetPort: ssh
selector: selector:
app: siranga app: siranga