Questo contenuto non è disponibile nella lingua selezionata.
Chapter 10. 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 in release 1.2.
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"
10.1. Upgrading Kafka resources Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
-
A Cluster Operator supporting the
v1beta1API version is up and running.
Procedure
Execute the following steps for each Kafka resource in your deployment.
Update the
Kafkaresource in an editor.oc edit kafka my-clusterReplace:
apiVersion: kafka.strimzi.io/v1alpha1with:
apiVersion:kafka.strimzi.io/v1beta1If the
Kafkaresource has:Kafka.spec.topicOperatorReplace it with:
Kafka.spec.entityOperator.topicOperatorFor example, replace:
spec: # ... topicOperator: {}with:
spec: # ... entityOperator: topicOperator: {}If present, move:
Kafka.spec.entityOperator.affinityKafka.spec.entityOperator.tolerationsto:
Kafka.spec.entityOperator.template.pod.affinityKafka.spec.entityOperator.template.pod.tolerationsFor example, move:
spec: # ... entityOperator: affinity {} tolerations {}to:
spec: # ... entityOperator: template: pod: affinity {} tolerations {}If present, move:
Kafka.spec.kafka.affinityKafka.spec.kafka.tolerationsto:
Kafka.spec.kafka.template.pod.affinityKafka.spec.kafka.template.pod.tolerationsFor example, move:
spec: # ... kafka: affinity {} tolerations {}to:
spec: # ... kafka: template: pod: affinity {} tolerations {}If present, move:
Kafka.spec.zookeeper.affinityKafka.spec.zookeeper.tolerationsto:
Kafka.spec.zookeeper.template.pod.affinityKafka.spec.zookeeper.template.pod.tolerationsFor 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.
10.2. Upgrading Kafka Connect resources Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
-
A Cluster Operator supporting the
v1beta1API version is up and running.
Procedure
Execute the following steps for each KafkaConnect resource in your deployment.
Update the
KafkaConnectresource in an editor.oc edit kafkaconnect my-connectReplace:
apiVersion: kafka.strimzi.io/v1alpha1with:
apiVersion:kafka.strimzi.io/v1beta1If present, move:
KafkaConnect.spec.affinityKafkaConnect.spec.tolerationsto:
KafkaConnect.spec.template.pod.affinityKafkaConnect.spec.template.pod.tolerationsFor 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.
10.3. Upgrading Kafka Connect S2I resources Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
-
A Cluster Operator supporting the
v1beta1API version is up and running.
Procedure
Execute the following steps for each KafkaConnectS2I resource in your deployment.
Update the
KafkaConnectS2Iresource in an editor.oc edit kafkaconnects2i my-connectReplace:
apiVersion: kafka.strimzi.io/v1alpha1with:
apiVersion:kafka.strimzi.io/v1beta1If present, move:
KafkaConnectS2I.spec.affinityKafkaConnectS2I.spec.tolerationsto:
KafkaConnectS2I.spec.template.pod.affinityKafkaConnectS2I.spec.template.pod.tolerationsFor 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.
10.4. Upgrading Kafka Mirror Maker resources Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
-
A Cluster Operator supporting the
v1beta1API version is up and running.
Procedure
Execute the following steps for each KafkaMirrorMaker resource in your deployment.
Update the
KafkaMirrorMakerresource in an editor.oc edit kafkamirrormaker my-connectReplace:
apiVersion: kafka.strimzi.io/v1alpha1with:
apiVersion:kafka.strimzi.io/v1beta1If present, move:
KafkaConnectMirrorMaker.spec.affinityKafkaConnectMirrorMaker.spec.tolerationsto:
KafkaConnectMirrorMaker.spec.template.pod.affinityKafkaConnectMirrorMaker.spec.template.pod.tolerationsFor 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.
10.5. Upgrading Kafka Topic resources Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
-
A Topic Operator supporting the
v1beta1API version is up and running.
Procedure
Execute the following steps for each KafkaTopic resource in your deployment.
Update the
KafkaTopicresource in an editor.oc edit kafkatopic my-topicReplace:
apiVersion: kafka.strimzi.io/v1alpha1with:
apiVersion:kafka.strimzi.io/v1beta1- Save the file, exit the editor and wait for the updated resource to be reconciled.
10.6. Upgrading Kafka User resources Copia collegamentoCollegamento copiato negli appunti!
Prerequisites
-
A User Operator supporting the
v1beta1API version is up and running.
Procedure
Execute the following steps for each KafkaUser resource in your deployment.
Update the
KafkaUserresource in an editor.oc edit kafkauser my-userReplace:
apiVersion: kafka.strimzi.io/v1alpha1with:
apiVersion:kafka.strimzi.io/v1beta1- Save the file, exit the editor and wait for the updated resource to be reconciled.