how to pass multiple ports in values.yaml of helm

The solution for “how to pass multiple ports in values.yaml of helm” can be found here. The following code will assist you in solving the problem.

apiVersion: v1
kind: Service
metadata:
name: {{ .Values.project }}-svc
spec:
type: ClusterIP
ports:
– name: {{ .Values.project }}-web
port: {{ .Values.serviceweb.port }}
protocol: TCP
targetPort: {{ .Values.serviceweb.targetPort }}
– name: {{ .Values.project }}-tcp
port: {{ .Values.servicetcp.port }}
protocol: TCP
targetPort: {{ .Values.servicetcp.targetPort }}
selector:
app: {{ .Values.project }}-{{ .Values.environment }}

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in