// This module is included in the following assemblies:
//
// upgrading/assembly_upgrade-kafka-versions.adoc

[id='con-versions-and-images-{context}']
= Kafka version and image mappings

When upgrading Kafka, consider your settings for the `STRIMZI_KAFKA_IMAGES` environment variable and the `Kafka.spec.kafka.version` property.

* Each `Kafka` resource can be configured with a `Kafka.spec.kafka.version`, which defaults to the latest supported Kafka version ({DefaultKafkaVersion}) if not specified.
* The Cluster Operator's `STRIMZI_KAFKA_IMAGES` environment variable provides a mapping (<kafka_version>=<image>) between a Kafka version and the image to be used when a specific Kafka version is requested in a given `Kafka` resource. For example, {DefaultKafkaVersion}={DockerKafkaImageCurrent}.
** If `Kafka.spec.kafka.image` is not configured, the default image for the given version is used.
** If `Kafka.spec.kafka.image` is configured, the default image is overridden.

WARNING: The Cluster Operator cannot validate that an image actually contains a Kafka broker of the expected version.
Take care to ensure that the given image corresponds to the given Kafka version.
