I share my Mac M1 experience withThis allows me to access localhost:9092 in Kafka/Zookeeper/Schema-Registry on dockers and clients applications on the Macmy M1. This set up requires that the port 9092 has to be used from the Mac, not from the docker, so the ports should be swapped
this way
Key: KAFKA_ADVERTISED_LISTENERS Value: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092 plus port forwarding :
ports - "9092:9092" Finally, again, for my set up, I have to set listeners key this way
Key: KAFKA_LISTENERS Value: PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092