diff --git a/charts/kafka-ui/templates/service.yaml b/charts/kafka-ui/templates/service.yaml index 339bb35a5a5..3dba7bd0359 100644 --- a/charts/kafka-ui/templates/service.yaml +++ b/charts/kafka-ui/templates/service.yaml @@ -11,5 +11,8 @@ spec: targetPort: http protocol: TCP name: http + {{- if (and (eq .Values.service.type "NodePort") .Values.service.nodePort) }} + nodePort: {{ .Values.service.nodePort }} + {{- end }} selector: {{- include "kafka-ui.selectorLabels" . | nindent 4 }} diff --git a/charts/kafka-ui/values.yaml b/charts/kafka-ui/values.yaml index 19db6082882..5d20e6d1d37 100644 --- a/charts/kafka-ui/values.yaml +++ b/charts/kafka-ui/values.yaml @@ -41,6 +41,8 @@ securityContext: {} service: type: ClusterIP port: 80 + # if you want to force a specific nodePort. Must be use with service.type=NodePort + # nodePort: ingress: enabled: false