Bruno Wego
Bruno Wego

Reputation: 2440

Prepend a command with instant DNS resolve

I need fake a DNS before running a command in my terminal.

Like a export environment, have a way to do something like this with DNS?

fakedns kafka=172.28.128.19 
kafkacat -C -b 172.28.128.19:9092 -t logging_application_access

Upvotes: 0

Views: 27

Answers (1)

Edenhill
Edenhill

Reputation: 3113

If the Kafka broker is using "kafka" as its advertised.listener and "kafka" is not available in DNS, you could add an entry to /etc/hosts on the client machine:

1.2.3.4 kafka

Upvotes: 1

Related Questions