-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document procedure to shutdown Kafka gracefully
- Loading branch information
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. _kafka-shutdown: | ||
|
||
|
||
######################### | ||
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: | ||
|
||
1. Pause reconciliation of Strimzi resources. | ||
This will prevent the operator from restarting the pods after they are deleted. | ||
|
||
.. code:: bash | ||
kubectl annotate --overwrite Kafka sasquatch strimzi.io/pause-reconciliation="true" -n sasquatch | ||
kubectl annotate --overwrite KafkaConnect sasquatch strimzi.io/pause-reconciliation="true" -n sasquatch | ||
2. Shut down Kafka and KafkaConnect pods. | ||
|
||
.. code:: bash | ||
kubectl delete StrimziPodSet sasquatch-connect sasquatch-controller sasquatch-kafka -n sasquatch | ||
3. After the intervention, resume reconciliation of Strimzi resources. | ||
This will allow the operator to restart the pods. | ||
|
||
.. code:: bash | ||
kubectl annotate --overwrite Kafka sasquatch strimzi.io/pause-reconciliation="false" -n sasquatch | ||
kubectl annotate --overwrite KafkaConnect sasquatch strimzi.io/pause-reconciliation="false" -n sasquatch |