I am trying to test Zookeeper to Kraft migration on my machine that later needs to done on dev env. I have created ZK and kafka images using podman and started them. Now one step in the migration is to enable migration on Kraft controllers and then on the ZK based Kafka brokers.
So to enable migration we have to add this flag zookeeper.metadata.migration.enable=true to brokers under the server.properties file and then restart them for the migration to begin. To make the change I exec into the container open the files and added this flag and saved it, but as soon as I stop and start it again, the change that I did is not present.
Now for migration, changes to server.properties needs to be on both Kraft controller and ZK-based broker a few times during the whole migration process like this flag. So will I have to rebuild the image again and again after I make changes to the configs ? or is there a way to make the changes persistent upon container restart..
docker exechas exactly the problem you describe here, that when the container is deleted and recreated any changes you make manually are lost. One typical approach is to bind-mount the configuration file from the host instead, so you can edit it normally and it will survive restarts, but you need a copy of it on the host to start with.server.propertiesis already present and comes with kafka's source code. So as I understand, ig I could create this file on my local system and volume mount it in the container... and after this if i lets say change this flag from true to false and restart the container I could see the changes being reflected, right ?