stackabletech / stackabletech/kafka-operator

Kafka brokers are not accessible from outside of the cluster because they advertise the InternalIP only

Open
#569 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Rust
Stars
28
Forks
8
Avg merge
2d 12h
Merged PRs (30d)
9

Description

Affected version

nightly (and possibly older versions)

Current and expected behavior

In the test an initial connection through a port forward is used to connect to 9092, but then the Kafka process advertises InternalIPs (10.x.x.x) which cannot be reached from the outside. The k8s nodes have InternalIPs and ExternalIPs (running on GKE). The operator should pick the ExternalIP over the InternalIP here

Starting port-forwarding of port 9092
Creating test data
Writing test data
%3|1679320241.591|FAIL|rdkafka#producer-1| [thrd:10.10.0.3:31313/1002]: 10.10.0.3:31313/1002: Connect to ipv4#10.10.0.3:31313 failed: Connection timed out (after 131226ms in state CONNECT)
% ERROR: Local: Broker transport failure: 10.10.0.3:31313/1002: Connect to ipv4#10.10.0.3:31313 failed: Connection timed out (after 131226ms in state CONNECT)
%3|1679320372.664|FAIL|rdkafka#producer-1| [thrd:10.10.0.3:31313/1002]: 10.10.0.3:31313/1002: Connect to ipv4#10.10.0.3:31313 failed: Connection timed out (after 130972ms in state CONNECT, 1 identical error(s) suppressed)
% ERROR: Local: Broker transport failure: 10.10.0.3:31313/1002: Connect to ipv4#10.10.0.3:31313 failed: Connection timed out (after 130972ms in state CONNECT, 1 identical error(s) suppressed)
% Delivery failed for message: Local: Message timed out
Possible solution

The listener operator should fix this (?)

Additional context
Environment
Would you like to work on fixing this bug?

None

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in rust/operator/src/kafka_controller.rs around line 773 and inspect how the listener operator selects node addresses. Reproduce the port-forwarded connection and check the broker’s advertised address. Done means brokers advertise reachable ExternalIPs rather than 10.x.x.x InternalIPs, allowing the external producer test to connect.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, rust
Domain
infrastructure, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.