This lab reproduces in the terminal the guide to fix bitnami/kafka not found and migrate to apache/kafka 4.4 with KRaft: we start from a Bitnami Kafka 3.9.0 in KRaft mode with 1,000 messages and a consumer group at offset 400, and move it to apache/kafka:4.4.0 on the same volume. Along the way two of the errors from the guide show up, Missing required configuration "process.roles" and AccessDeniedException, and you fix both in the compose file.

Why bitnami/kafka returns not found

Bitnami emptied its Docker Hub repository and moved the old images to bitnamilegacy, as announced in bitnami/containers issue 83267. bitnamilegacy/kafka:3.9.0 still pulls, and the lab uses it as the starting point, but it gets no patches. The guide to the docker.io/bitnami/postgresql not found error covers the full retirement timeline.

What the capture proves

Every step in the video really ran on an arm64 machine with Docker. The capture leaves four pieces of evidence:

  • docker pull bitnami/kafka:3.9 exits with code 1 and not found
  • changing only the image leaves the container in Exited (1) with Missing required configuration "process.roles", because all seven variables still carry the KAFKA_CFG_ prefix
  • with the variables renamed and the CLUSTER_ID from the volume, Kafka fails with AccessDeniedException because the data belongs to UID 1001
  • after the chown to UID 1000, the topic keeps its 1,000 messages with the same SHA-256 sum, the group is still at offset 400 and the next consumer gets pedido-401

The four differences between the two images

The apache/kafka page on Docker Hub explains that the image turns every KAFKA_* variable into a property and that, once you define one, it stops applying the rest of its default configuration. That gives the four differences in the lab: the prefix without CFG_, the CLUSTER_ID read from meta.properties, KAFKA_LOG_DIRS always set, and the owner of the data. The mount uses subpath, documented in the Compose volumes reference, to place the data folder of the Bitnami volume on the path of the official image.

The tar copy of the volume before the chown follows the pattern of the Docker volume backup and restore lab. If you reached this error from another retired image, the lab to fix the MinIO pull access denied error solves the same kind of problem with another image.

What this lab does not cover

The lab does not record raising metadata.version to 4.4, which the guide recommends once you have run for a few days without incidents, nor the three-node cluster. It does not cover a Bitnami Kafka that still uses ZooKeeper either: that case has to be migrated to KRaft on 3.9 before touching 4, as the Kafka upgrade notes require. The article on Kafka without ZooKeeper and KRaft in production explains what changes in day-to-day operations.

FAQ

Why does apache/kafka fail with Missing required configuration "process.roles"?

Because you are still using the Bitnami KAFKA_CFG_ variables. The official image turns every KAFKA_ variable into a property, so KAFKA_CFG_PROCESS_ROLES ends up as cfg.process.roles. Drop CFG_ from every name and the error goes away.

Can I reuse the Bitnami volume with apache/kafka?

Yes, if Bitnami was already running in KRaft mode. You need the same CLUSTER_ID and node.id stored in data/meta.properties, KAFKA_LOG_DIRS pointing at that folder, and a chown to UID 1000. In this lab the 1,000 messages gave the same SHA-256 sum.

Why does AccessDeniedException appear on __cluster_metadata-0?

Because Bitnami writes the data as UID 1001 and apache/kafka runs as appuser, UID 1000. Stop Kafka, back up the volume and run chown -R 1000:1000 from a throwaway container. After that, Bitnami can no longer write to the volume.