-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Exposing a nodeport type listener does not work on DockerDesktop #11091
Comments
This is not a Strimzi bug but a limitation of your environment. You can follow this blog post series - https://strimzi.io/blog/2019/04/17/accessing-kafka-part-1/ - and our documentation to understand how Kafka works and uses its discovery protocol and how you can configure it if needed. |
As mentioned above, the bitnami/kafka image works. Likewise, all other services that I exposed via NodePort so far worked just fine. To me it seems very much related to the way strimzi exposes its nodeport services.
|
Here the my resource descriptor # Original resource descriptor
# https://github.com/strimzi/strimzi-kafka-operator/blob/main/examples/kafka/kraft/kafka-single-node.yaml
# Kafka NodePool
---
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaNodePool
metadata:
name: dual-role
labels:
strimzi.io/cluster: cluster
spec:
replicas: 1
roles:
- controller
- broker
storage:
type: jbod
volumes:
- id: 0
type: persistent-claim
size: 100Gi
deleteClaim: false
kraftMetadata: shared
# Kafka Cluster
---
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: cluster
annotations:
strimzi.io/node-pools: enabled
strimzi.io/kraft: enabled
spec:
kafka:
version: 3.9.0
metadataVersion: 3.9-IV0
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
# Accessing Kafka using node ports
# https://strimzi.io/docs/operators/latest/deploying#proc-accessing-kafka-using-nodeports-str
- name: external
port: 9095
type: nodeport
tls: false
config:
offsets.topic.replication.factor: 1
transaction.state.log.replication.factor: 1
transaction.state.log.min.isr: 1
default.replication.factor: 1
min.insync.replicas: 1
entityOperator:
topicOperator: {}
userOperator: {}
|
FWIW, here is plain strimzi-kafka deployment that works with nodeport on DockerDesktop |
Bug Description
I have this NodePort listener definition on local single node DockerDesktop ...
When I query the cluster status I get ...
and these services
Eventually I'd like to connect to the Kafka listener from an external Java client. Neither the above mentioned 192.168.65.3:30172 nor cluster-kafka-external-bootstrap:30172 works with ...
I tried mapping cluster-kafka-external-bootstrap to my host IP in /etc/hosts
Does this look right to you? What else could I try?
Steps to reproduce
Running operator on DockerDesktop MacOS, then do the above.
Expected behavior
Ideally, the single node strimzi cluster should work as it does with this bitnami deployment
Strimzi version
0.45.0
Kubernetes version
Kubernetes 1.30.5
Installation method
Strimzi QuickStart
Infrastructure
DockerDesktop on MacOS M2
Configuration files and logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: