Skip to content

Commit 065ba5a

Browse files
committed
Clarify DNS resolution and advertised.listeners behavior in stretch Kafka clusters
Update proposal to clarify that .cluster.local is not used in advertised.listeners and that .svc is sufficient for intra-cluster DNS resolution. Signed-off-by: Aswin A <[email protected]>
1 parent 8428b34 commit 065ba5a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

095-stretch-cluster.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,11 @@ This allows controllers and brokers to discover and communicate with each other
243243
In a non-stretch (single Kubernetes cluster) Kafka deployment, the `advertised.listeners` of a broker pod typically resolves to the pod's internal DNS address:
244244

245245
```yaml
246-
<broker-pod-name>.<broker-service-name>(.<namespace>.svc.cluster.local)
246+
<broker-pod-name>.<broker-service-name>(.<namespace>.svc):<port>
247247
```
248248

249-
The last section of the DNS name (in parentheses) is not required for discovery and communication within the same namespace and cluster and typically resolves to the pod IP via the headless service.
249+
While it is technically valid to append the full DNS suffix `.cluster.local`, Strimzi does not include it by default in `advertised.listeners`, and it is **not required** for intra-cluster communication.
250+
The `.svc` suffix is sufficient for DNS resolution within the Kubernetes cluster.
250251

251252
However, in a stretched Kafka cluster, brokers and controllers are distributed across multiple Kubernetes clusters.
252253
In this case, a broker’s `advertised.listeners` must not only identify the broker pod but also indicate the Kubernetes cluster the pod resides in, so that cross-cluster pod-to-pod communication can happen correctly.
@@ -284,7 +285,7 @@ PLAIN-9092://<broker-pod-name>.<broker-service-name>.<namespace>.svc:9092,
284285
TLS-9093://<broker-pod-name>.<broker-service-name>.<namespace>.svc:9093
285286
```
286287

287-
In a multi-cluster deployment, the operator modifies the format to include `<stretch-cluster-alias>` and appends `.svc.clusterset.local` to enable cross-cluster DNS resolution:
288+
In a multi-cluster deployment, the operator running in the Central cluster modifies the format to include `<stretch-cluster-alias>` and appends `.svc.clusterset.local` to enable cross-cluster DNS resolution:
288289

289290
```yaml
290291
advertised.listeners=REPLICATION-9091://<broker-pod-name>.<stretch-cluster-alias>.<broker-service-name>.<namespace>.svc.clusterset.local:9091,

0 commit comments

Comments
 (0)