Restart Confluent Platform Using Confluent for Kubernetes
There are cases when it is necessary to trigger a restart of a Confluent Platform cluster, such as to apply a license change or to apply credentials changes in a Kubernetes Secret.
Restart Kafka and KRaft
Unlike other Confluent components, Kafka restarts require special handling to preserve data integrity.
Important
The process described in this section is the ONLY Confluent-supported method to restart Kafka clusters managed by CFK.
When triggered to restart Kafka, CFK performs controlled, sequential restarts by:
Restarting brokers one at a time (from highest-numbered broker to broker-0)
Performing health checks, including verifying no Under-Replicated Partitions (URPs)
Ensuring cluster stability and data availability throughout the process
Proceeding only when each broker passes health checks
If you do not use the steps described in this section to restart Kafka, no sequencing and orchestration happen, and the integrity of the data could be potentially compromised.
To manually roll Kafka or KRaft:
Add the following annotation in the Kafka or KRaft CR:
spec: podTemplate: annotations: kafkacluster-manual-roll: "<trigger-value>"
To restart Kafka or KRaft, set the value of the
kafkacluster-manual-roll
annotation to a value ("<trigger-value>"
) that is different from the value used in the most recent rollout. If you apply the CR with the same value as before, CFK will detect no change, and no restart will occur. KRaft restarts are not supported.The
"<trigger-value>"
is an arbitrary string that triggers the rolling restart. It does not correspond to broker IDs or cluster size. You can use:Simple incremental numbers:
1
,2
,3
Descriptive strings:
update-log-retention
,applying-new-certs
Any other unique string value
Apply the change:
kubectl apply -f <Kafka or KRaft CR>
Restart Confluent Platform components
Warning
It is crucial that you DO NOT USE the direct StatefulSet rollout steps described in this section to restart Kafka clusters. It may result in data loss.
Use the process described in Restart Kafka and KRaft for Kafka. When
rolling out Kafka using the recommended annotation
kafkacluster-manual-roll
, CFK performs roll checks to prevent data
loss, including checks for under-replicated partitions.
Restart a Confluent Platform component after making the following updates on the component:
Changing Telemetry settings
Loading credentials
Updating the license
Updating the external load balancer domain name
Updating the component prefix
Updating the authentication user list
To restart a Confluent Platform component cluster:
Find the name of the StatefulSet corresponding to the Confluent Platform cluster you want to restart:
kubectl get statefulset --namespace <namespace>
Using the StatefulSet name,
<name-of-statefulset>
, retrieved from the previous step, roll the cluster:kubectl rollout restart statefulset/<name-of-statefulset> --namespace <namespace>