Static nodeport for external service #10789
-
Hi, apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: kafka-cluster
spec:
kafka:
version: 3.8.0
replicas: 1
listeners:
- name: plainext
port: 9092
type: nodeport
tls: false
configuration:
brokers:
- broker: 0
nodePort: 31542
- name: tls
port: 9093
type: internal
tls: true
- name: external
port: 9094
tls: false
type: nodeport
configuration:
brokers:
- broker: 1
advertisedHost: localhost
advertisedPort: 32769
nodePort: 32769
... Expectation: the
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I think you are configuring it in the right way: https://strimzi.io/docs/operators/latest/full/configuring.html#property-listener-config-nodeport-reference But if you have broker |
Beta Was this translation helpful? Give feedback.
-
From https://strimzi.io/docs/operators/latest/full/configuring.html#property-listener-config-nodeport-reference By default, the port numbers used for the bootstrap and broker services are automatically assigned by Kubernetes. You can override the assigned node ports for nodeport listeners by specifying the desired port numbers. Strimzi does not perform any validation on the requested ports. You must ensure that they are free and available for use. # ...
listeners:
#...
- name: external
port: 9094
type: nodeport
tls: true
configuration:
bootstrap:
nodePort: 32100
brokers:
- broker: 0
nodePort: 32000
# ... |
Beta Was this translation helpful? Give feedback.
I think you are configuring it in the right way: https://strimzi.io/docs/operators/latest/full/configuring.html#property-listener-config-nodeport-reference
But if you have broker
0
in your cluster, you have to configure the port for the broker0
and not for the broker1
. So your configuration for port32769
would be used only if you scale the number of brokers to actually have a broker with ID1
.