Skip to content

Commit

Permalink
Document procedure to shutdown Kafka gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
afausti committed Oct 9, 2024
1 parent 2b4deaa commit 4bfbf45
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
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

0 comments on commit 4bfbf45

Please sign in to comment.