Shutdown Kafka gracefullyΒΆ
It is recommended that you shut down Kafka gracefully before cluster interventions like OS or Kubernetes upgrades. To shut down Kafka gracefully, follow these steps:
Pause reconciliation of Strimzi resources. This will prevent the operator from restarting the pods after they are deleted.
kubectl annotate --overwrite Kafka sasquatch strimzi.io/pause-reconciliation="true" -n sasquatch kubectl annotate --overwrite KafkaConnect sasquatch strimzi.io/pause-reconciliation="true" -n sasquatch
Shut down Kafka and KafkaConnect pods.
kubectl delete StrimziPodSet sasquatch-connect sasquatch-controller sasquatch-kafka -n sasquatch
After the intervention, resume reconciliation of Strimzi resources. This will allow the operator to restart the pods.
kubectl annotate --overwrite Kafka sasquatch strimzi.io/pause-reconciliation="false" -n sasquatch kubectl annotate --overwrite KafkaConnect sasquatch strimzi.io/pause-reconciliation="false" -n sasquatch