0

I have started at a new company, and they only have two environments, one is a test environment and the other is a Prod environment. In the test environment, lots of development teams are using this single instance of Kafka.

I want to upgrade Strimzi, which manages Kafka, and eventually I want to upgrade Kafka too. However, I want to test my script first, and I also want a way to restore the current state incase I break anything.

I have taken a copy of all the yaml in the namespace, but not sure if just re-applying this would restore anything I break. I was hoping there was a way to just clone the entire setup?

Also, I want to create a new test environment, for unit testing, a bit of a route to live, but not sure how to do this.

I have tried to copy and save all the YAML and deploy to a local Docker container, but this doesnt work. I havent tried anything in regards to the upgrade failing. Upgrading on the local Docker container is working fine

5
  • I think a lot depends on what do you mean with "clone". If you want to just have a cluster with the same settings, you should be fine with reusing the same YAML files. If it means to clone including the current data, it will be harder and will require you to also snapshot / copy the data.
    – Jakub
    Commented Jun 25 at 8:56
  • Thank you - yeah, I think for now, I just want to make sure I dont break their environment, so in case the script fails or something, I can just pop the exported yaml back, and I can get back to a state I was at pre implementation. Ideally it would be good to have a way to automate the backup of the kafka/zookeeper/strimzi configuration (not inc data). Data is the next step. I just want to upgrade Strimzi, then upgrade Kafka, to the latest versions, and not break any of the kafka environment. So backing up the YAML would work then? Commented Jun 25 at 9:13
  • The Strimzi part of the configuration is in the YAMLs. And exporting or copying the YAMls doesn't do anything to the original environment. So you can for example just get them with kubectl get strimzi -o yaml, clean them (the .status sections, some of the metadata information etc.) and use them on a different Kubernetes cluster.
    – Jakub
    Commented Jun 25 at 12:17
  • thanks, and is there a similar way I can clone all of the Kafka estate and deploy a image of the setup on another k8s? Commented Jun 26 at 9:32
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Commented Jul 1 at 18:25

0