このコンテンツは選択した言語では利用できません。
Chapter 14. AMQ Streams resource upgrades
For this release of AMQ Streams, resources that use the API version kafka.strimzi.io/v1alpha1
must be updated to use kafka.strimzi.io/v1beta1
.
The kafka.strimzi.io/v1alpha1
API version is deprecated.
This section describes the upgrade steps for the resources.
The upgrade of resources must be performed after upgrading the Cluster Operator, so the Cluster Operator can understand the resources.
What if the resource upgrade does not take effect?
If the upgrade does not take effect, a warning is given in the logs on reconciliation to indicate that the resource cannot be updated until the apiVersion
is updated.
To trigger the update, make a cosmetic change to the custom resource, such as adding an annotation.
Example annotation:
metadata: # ... annotations: upgrade: "Upgraded to kafka.strimzi.io/v1beta1"
14.1. Upgrading Kafka resources
Prerequisites
-
A Cluster Operator supporting the
v1beta1
API version is up and running.
Procedure
Execute the following steps for each Kafka
resource in your deployment.
Update the
Kafka
resource in an editor.oc edit kafka my-cluster
Replace:
apiVersion: kafka.strimzi.io/v1alpha1
with:
apiVersion:kafka.strimzi.io/v1beta1
If the
Kafka
resource has:Kafka.spec.topicOperator
Replace it with:
Kafka.spec.entityOperator.topicOperator
For example, replace:
spec: # ... topicOperator: {}
with:
spec: # ... entityOperator: topicOperator: {}
If present, move:
Kafka.spec.entityOperator.affinity
Kafka.spec.entityOperator.tolerations
to:
Kafka.spec.entityOperator.template.pod.affinity
Kafka.spec.entityOperator.template.pod.tolerations
For example, move:
spec: # ... entityOperator: affinity {} tolerations {}
to:
spec: # ... entityOperator: template: pod: affinity {} tolerations {}
If present, move:
Kafka.spec.kafka.affinity
Kafka.spec.kafka.tolerations
to:
Kafka.spec.kafka.template.pod.affinity
Kafka.spec.kafka.template.pod.tolerations
For example, move:
spec: # ... kafka: affinity {} tolerations {}
to:
spec: # ... kafka: template: pod: affinity {} tolerations {}
If present, move:
Kafka.spec.zookeeper.affinity
Kafka.spec.zookeeper.tolerations
to:
Kafka.spec.zookeeper.template.pod.affinity
Kafka.spec.zookeeper.template.pod.tolerations
For example, move:
spec: # ... zookeeper: affinity {} tolerations {}
to:
spec: # ... zookeeper: template: pod: affinity {} tolerations {}
- Save the file, exit the editor and wait for the updated resource to be reconciled.
14.2. Upgrading Kafka Connect resources
Prerequisites
-
A Cluster Operator supporting the
v1beta1
API version is up and running.
Procedure
Execute the following steps for each KafkaConnect
resource in your deployment.
Update the
KafkaConnect
resource in an editor.oc edit kafkaconnect my-connect
Replace:
apiVersion: kafka.strimzi.io/v1alpha1
with:
apiVersion:kafka.strimzi.io/v1beta1
If present, move:
KafkaConnect.spec.affinity
KafkaConnect.spec.tolerations
to:
KafkaConnect.spec.template.pod.affinity
KafkaConnect.spec.template.pod.tolerations
For example, move:
spec: # ... affinity {} tolerations {}
to:
spec: # ... template: pod: affinity {} tolerations {}
- Save the file, exit the editor and wait for the updated resource to be reconciled.
14.3. Upgrading Kafka Connect S2I resources
Prerequisites
-
A Cluster Operator supporting the
v1beta1
API version is up and running.
Procedure
Execute the following steps for each KafkaConnectS2I
resource in your deployment.
Update the
KafkaConnectS2I
resource in an editor.oc edit kafkaconnects2i my-connect
Replace:
apiVersion: kafka.strimzi.io/v1alpha1
with:
apiVersion:kafka.strimzi.io/v1beta1
If present, move:
KafkaConnectS2I.spec.affinity
KafkaConnectS2I.spec.tolerations
to:
KafkaConnectS2I.spec.template.pod.affinity
KafkaConnectS2I.spec.template.pod.tolerations
For example, move:
spec: # ... affinity {} tolerations {}
to:
spec: # ... template: pod: affinity {} tolerations {}
- Save the file, exit the editor and wait for the updated resource to be reconciled.
14.4. Upgrading Kafka Mirror Maker resources
Prerequisites
-
A Cluster Operator supporting the
v1beta1
API version is up and running.
Procedure
Execute the following steps for each KafkaMirrorMaker
resource in your deployment.
Update the
KafkaMirrorMaker
resource in an editor.oc edit kafkamirrormaker my-connect
Replace:
apiVersion: kafka.strimzi.io/v1alpha1
with:
apiVersion:kafka.strimzi.io/v1beta1
If present, move:
KafkaConnectMirrorMaker.spec.affinity
KafkaConnectMirrorMaker.spec.tolerations
to:
KafkaConnectMirrorMaker.spec.template.pod.affinity
KafkaConnectMirrorMaker.spec.template.pod.tolerations
For example, move:
spec: # ... affinity {} tolerations {}
to:
spec: # ... template: pod: affinity {} tolerations {}
- Save the file, exit the editor and wait for the updated resource to be reconciled.
14.5. Upgrading Kafka Topic resources
Prerequisites
-
A Topic Operator supporting the
v1beta1
API version is up and running.
Procedure
Execute the following steps for each KafkaTopic
resource in your deployment.
Update the
KafkaTopic
resource in an editor.oc edit kafkatopic my-topic
Replace:
apiVersion: kafka.strimzi.io/v1alpha1
with:
apiVersion:kafka.strimzi.io/v1beta1
- Save the file, exit the editor and wait for the updated resource to be reconciled.
14.6. Upgrading Kafka User resources
Prerequisites
-
A User Operator supporting the
v1beta1
API version is up and running.
Procedure
Execute the following steps for each KafkaUser
resource in your deployment.
Update the
KafkaUser
resource in an editor.oc edit kafkauser my-user
Replace:
apiVersion: kafka.strimzi.io/v1alpha1
with:
apiVersion:kafka.strimzi.io/v1beta1
- Save the file, exit the editor and wait for the updated resource to be reconciled.