I am running in my locahost both Zookeeper and Kafka (1 instance each).
I create succesfully a topic from kafka:
./bin/kafka-topics.sh --zookeeper lo
If this happens suddenly after it was working, you should try to restart Kafka first.
In my case, restarting solved the problem:
$docker-compose down && docker-compose up -d