# Apache Kafka - Upgrade

## **PaaS upgrade workflow** <a href="#redisupgradeinplace-redispaasupgrade" id="redisupgradeinplace-redispaasupgrade"></a>

### Request <a href="#kafkaupgrade-request" id="kafkaupgrade-request"></a>

Upgrading an Apache Kafka PaaS operating in **KRaft** mode is managed by **cegedim.cloud** and can be requested through an [ITCare ticket](https://itcare.cegedim.cloud/support?createTicket=true\&requestTypeIndex=4\&formName=MES_KAFKA\&step=Request). Please specify your preferred time slot for the upgrade.

Indicate clearly if the upgrade must be performed outside of business hours for RFC planning purposes.

It is recommended to first perform the upgrade on non-production environments to validate the new metadata version.

{% hint style="warning" %}
Migration from Apache Kafka clusters operating in ZooKeeper mode to KRaft mode **is not supported** by **cegedim.cloud !**

This limitation is due to significant structural changes introduced with KRaft mode starting from version **3.x**.

To use KRaft mode, you must perform a new installation and then migrate your application data to the new cluster.
{% endhint %}

### Process <a href="#kafkaupgrade-procedure" id="kafkaupgrade-procedure"></a>

The Kafka cluster upgrade follows these steps in **Rolling Update** mode:

1. Sequential upgrade of Kafka brokers & controllers without a total service outage.
2. Post-upgrade validation (health checks, monitoring).

<figure><picture><source srcset="/files/Bh8aUGtFEwn9YIKM8vZ6" media="(prefers-color-scheme: dark)"><img src="/files/8JnkzpaIZi44MvQPdUDM" alt="" width="563"></picture><figcaption></figcaption></figure>

### Impacts

When upgrading Apache Kafka, anticipate the following potential impacts:

* **Kafka Clients (consumers and producers)**: Brief connection interruptions may occur during broker restarts. Clients should handle these temporary interruptions automatically.
* **Application Compatibility**: Pre-check the compatibility of your applications and scripts with the new Kafka version.
* **Operating System Upgrade**: An upgrade of Debian distribution may cause temporary service interruptions during node reboots.

**Potential Risks:**

* Temporary traffic interruptions during sequential restarts.
* Client compatibility issues with the new Kafka version.
* Unexpected issues related to internal Kafka changes or OS upgrades.

### Time references <a href="#kafkaupgrade-referenceduration" id="kafkaupgrade-referenceduration"></a>

Upgrading Apache Kafka from version 3.6.0 to 4.0.0 typically takes around 5 minutes on average.

These times are indicative and may vary depending on specific cluster configurations.

## Operating System (OS) Upgrade

Upgrading the Debian Linux distribution from Debian 10 to Debian 12 can also be requested through an ITCare ticket.

This upgrade is automated and typically takes around 10 minutes per node.

### OS Upgrade Best Practices

* Check application compatibility.
* Validate the procedure in non-production environments beforehand.

## **Supported OS / Apache Kafka Compatibility Matrix** <a href="#kafkaupgrade-supportedos-kafkamatrix" id="kafkaupgrade-supportedos-kafkamatrix"></a>

Linux distributions supported by **cegedim.cloud** according to Apache Kafka version.

### **Apache Kafka and OS Compatibility Table**

<table><thead><tr><th width="258">Apache Kafka version</th><th>Supported Linux distribution</th></tr></thead><tbody><tr><td>Apache Kafka 2.7</td><td>Debian 10</td></tr><tr><td>Apache Kafka 3.6</td><td>Debian 12</td></tr><tr><td>Apache Kafka 3.9</td><td>Debian 12</td></tr><tr><td>Apache Kafka 4.0</td><td>Debian 12</td></tr><tr><td>Apache Kafka 4.1</td><td>Debian 12</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.cegedim.cloud/messaging/apache-kafka/apache-kafka-upgrade.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
