Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document procedure to shutdown Kafka gracefully #42

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/developer-guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A Sasquatch developer is responsible for maintaining the Sasquatch components an
:caption: Guides

strimzi-updates
kafka-shutdown
broker-migration
connectors

Expand Down
31 changes: 31 additions & 0 deletions docs/developer-guide/kafka-shutdown.rst
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