Replaced Nginx Ingress Controller with NodePort Service

This commit is contained in:
Mingchen Dai
2024-09-17 10:54:03 +00:00
parent 3cf82cb947
commit d6319c9814
9 changed files with 247 additions and 112 deletions

View File

@@ -6,8 +6,18 @@ metadata:
spec:
selector:
app: {{.ObjectMeta.Name}}
sessionAffinity: None
type: NodePort
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilyPolicy: SingleStack
ipFamilies:
- IPv4
ports:
- name: ssh
port: {{.Spec.Ingress.Port}}
targetPort: ssh-port
protocol: TCP
- name: ssh-port
protocol: TCP
port: 22
targetPort: {{.Spec.StatefulSet.ContainerPort}}
{{ if .Spec.Service.NodePort}}
nodePort: {{.Spec.Service.NodePort}}
{{ end }}