> For the complete documentation index, see [llms.txt](https://academy.cegedim.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.cegedim.cloud/messaging/apache-kafka/apache-kafka-upgrade.md).

# 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).

```mermaid
graph TD
    start["Apache Kafka X<br/>Debian X"] --> broker["Upgrade broker node<br/>(one at a time, no service outage)"]
    start --> controllers["Upgrade controllers<br/>(one at a time, no service outage)"]
    broker --> validation["Post upgrade validation"]
    controllers --> validation
    validation --> done["Apache Kafka Y<br/>Debian Y"]

    start -.->|Handled by cegedim.cloud| done

    style start fill:#e8e8e8,stroke:#000,stroke-width:2px,color:#000
    style broker fill:#c8e6c9,stroke:#2ca02c,stroke-width:2px,color:#000
    style controllers fill:#c8e6c9,stroke:#2ca02c,stroke-width:2px,color:#000
    style validation fill:#ffe0b2,stroke:#e8820c,stroke-width:2px,color:#000
    style done fill:#e8e8e8,stroke:#000,stroke-width:2px,color:#000
```

### 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
