Set the Karapace version
You can set which Karapace version your Aiven for Apache Kafka® service runs.
Set a specific version to test compatibility or to control upgrades. If you do
not set a version, the service uses the latest Karapace version available
through maintenance updates. After you set karapace_version, the service
keeps that version until you change the setting or set it to null.
Prerequisites
- An Aiven for Apache Kafka service with Karapace enabled
- A maintenance update that includes Karapace version selection
Set a Karapace version
Set karapace_version to one of the Karapace versions available for
selection. Aiven makes the two most recent Karapace versions available for
selection. To upgrade or roll back, change the setting to another available
version.
Older Karapace versions can remain supported for services already running them. They might no longer be available for version selection.
- Console
- CLI
- API
- Log in to the Aiven Console.
- Select your project and your Aiven for Apache Kafka service.
- Click Service settings.
- Click Advanced configuration > Configure.
- Click Add configuration options.
- Set
karapace_versionto a version available for selection, for example,6.2.2. - Click Save configuration.
Run the following command:
avn service update SERVICE_NAME --project PROJECT_NAME \
-c karapace_version=VERSION
Replace the following:
SERVICE_NAME: name of your Aiven for Apache Kafka servicePROJECT_NAME: name of your Aiven projectVERSION: Karapace version available for selection, for example,6.2.2
Send the following PUT request:
curl --request PUT \
--url "https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME" \
--header "Authorization: Bearer API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"user_config": {"karapace_version": "VERSION"}}'
Replace the following:
PROJECT_NAME: name of your Aiven projectSERVICE_NAME: name of your Aiven for Apache Kafka serviceAPI_TOKEN: your Aiven API tokenVERSION: Karapace version available for selection, for example,6.2.2
Troubleshoot a failed change
If Aiven returns an error when you set the version, apply a maintenance update. The update enables Karapace version selection or makes the selected version available on the service. Then set the version again.
Stop using a specific version
Set karapace_version to null to stop using a specific version. The service
then uses the latest Karapace version available through maintenance updates.
- CLI
- API
Run the following command:
avn service update SERVICE_NAME --project PROJECT_NAME \
-c karapace_version=null
Replace the following:
SERVICE_NAME: name of your Aiven for Apache Kafka servicePROJECT_NAME: name of your Aiven project
Send the following PUT request:
curl --request PUT \
--url "https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME" \
--header "Authorization: Bearer API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"user_config": {"karapace_version": null}}'
Replace the following:
PROJECT_NAME: name of your Aiven projectSERVICE_NAME: name of your Aiven for Apache Kafka serviceAPI_TOKEN: your Aiven API token
Check the Karapace version
Check karapace_version to see whether the service is set to a specific
version.
- Console
- CLI
- API
- Log in to the Aiven Console.
- Select your project and your Aiven for Apache Kafka service.
- Click Service settings.
- Click Advanced configuration.
- Check the
karapace_versionvalue.
Run the following command:
avn service get SERVICE_NAME --project PROJECT_NAME --json
Replace the following:
SERVICE_NAME: name of your Aiven for Apache Kafka servicePROJECT_NAME: name of your Aiven project
Send the following GET request:
curl --request GET \
--url "https://api.aiven.io/v1/project/PROJECT_NAME/service/SERVICE_NAME" \
--header "Authorization: Bearer API_TOKEN"
Replace the following:
PROJECT_NAME: name of your Aiven projectSERVICE_NAME: name of your Aiven for Apache Kafka serviceAPI_TOKEN: your Aiven API token
In the Aiven Console, if karapace_version shows a version number, the
service is set to that version. If the option is not listed or has no value,
the service is not set to a specific version.
In the CLI output or API response, check karapace_version in user_config.
If it contains a version number, the service is set to that version. If the
value is null or the field is not present, the service is not set to a
specific version.