K8s deployment Kafka has been reporting errors.

Record that k8s will crash all the time when it deploys Kafka.

 ERROR [KafkaServer id=2] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.lang.IllegalArgumentException: requirement failed: Configured end points 10.43.180.42:9092 in advertised listeners are already registered by broker 1
	at kafka.server.KafkaServer.$anonfun$createBrokerInfo$3(KafkaServer.scala:478)
	at kafka.server.KafkaServer.$anonfun$createBrokerInfo$3$adapted(KafkaServer.scala:476)
	at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:553)
	at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:551)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:920)
	at kafka.server.KafkaServer.createBrokerInfo(KafkaServer.scala:476)
	at kafka.server.KafkaServer.startup(KafkaServer.scala:311)
	at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
	at kafka.Kafka$.main(Kafka.scala:82)
	at kafka.Kafka.main(Kafka.scala)

solve:

Change the name of deployment or statefulset to not “Kafka” and solve it successfully.

Read More: