Port Forwarding (K8s)
This page provides documentation on how to solve a common problem with WarpStream: connecting to Agents deployed in K8s by port-forwarding.
kubectl port-forward $POD_NAME 9092warpstream cli diagnose-connectionrunning diagnose-connection sub-command with bootstrap-host: localhost and bootstrap-port: 9092
Broker Details
---------------
10.212.3.4:9092 (NodeID: 206702995) [asia-southeast1-a]
failed to communicate with Agent returned as part of Kafka Metadata response, err: <nil>, this usually means that the provided bootstrap host: localhost:9092 is accessible on the current network, but the URL that the Agent is advertising as its broker host/ip: 10.212.3.4:9092 is not accessible on this network. If this is occurring during local development whilst running the Agent in a docker container, consider adding the following flag to the docker run command: --env "WARPSTREAM_PRIVATE_IP_OVERRIDE=127.0.0.1" which will force the Agent to advertise its hostname/IP address as localhost for development purposes.warpstream cli diagnose-connection -client-id ws_host_override=localhostrunning diagnose-connection sub-command with bootstrap-host: localhost and bootstrap-port: 9092
Broker Details
---------------
LoCALHOst:9092 (NodeID: 206702995) [asia-southeast1-a]
ACCESSIBLE ✅
LOcALhOST:9092 (NodeID: 576636702) [asia-southeast1-b]
ACCESSIBLE ✅
LoCAlhost:9092 (NodeID: 1053567971) [asia-southeast1-c]
ACCESSIBLE ✅
Last updated
Was this helpful?