Upgrade v0.48.0 → v1.1.0
Overview
Section titled “Overview”This document describes the upgrade procedure for the Strimzi Kafka Operator from v0.48.0 to v1.1.0.
The upgrade requires intermediate versions because of API and CRD changes introduced in newer Strimzi releases.
Upgrade path:
v0.48.0 | vv0.49.1 | vv0.50.1 | vv0.51.0 | vv1.0.0 | vv1.0.1 | vv1.1.0Prerequisites
Section titled “Prerequisites”Before starting:
- Verify the Kafka cluster is healthy.
- Ensure you have Kubernetes cluster-admin permissions.
- Ensure Helm is configured with the Strimzi repository.
- Backup Strimzi resources and CRDs.
Verify Kafka cluster:
kubectl get kafka inma-kafka-cluster -n inma-kafkaBackup current CRDs:
kubectl get crd -l app=strimzi -o yaml > strimzi-crds-backup.yamlBackup Helm release:
helm list -n inma-kafkaStep 1 - Upgrade Strimzi Operator to v0.49.1
Section titled “Step 1 - Upgrade Strimzi Operator to v0.49.1”Apply CRDs:
kubectl apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.49.1/strimzi-crds-0.49.1.yamlUpdate Helm repository:
helm repo updateUpgrade operator:
helm upgrade strimzi strimzi/strimzi-kafka-operator \--version 0.49.1 \--namespace inma-kafkaVerify:
kubectl get pods -n inma-kafkaStep 2 - Upgrade Strimzi Operator to v0.50.1
Section titled “Step 2 - Upgrade Strimzi Operator to v0.50.1”Apply CRDs:
kubectl apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.50.1/strimzi-crds-0.50.1.yamlUpdate Helm repository:
helm repo updateUpgrade operator:
helm upgrade strimzi strimzi/strimzi-kafka-operator \--version 0.50.1 \--namespace inma-kafkaVerify:
kubectl get pods -n inma-kafkaStep 3 - Upgrade Strimzi Operator to v0.51.0
Section titled “Step 3 - Upgrade Strimzi Operator to v0.51.0”Apply CRDs:
kubectl apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.51.0/strimzi-crds-0.51.0.yamlUpdate Helm repository:
helm repo updateUpgrade operator:
helm upgrade strimzi strimzi/strimzi-kafka-operator \--version 0.51.0 \--namespace inma-kafkaStep 4 - Verify CRD Versions
Section titled “Step 4 - Verify CRD Versions”Check CRD storage versions:
kubectl get crd -l app=strimzi \-o custom-columns="NAME:.metadata.name,STORAGE-VERSIONS:.status.storedVersions"Detailed check:
kubectl get crd -o json | jq -r '.items[]| select(.metadata.name | contains("strimzi"))| "\(.metadata.name) stored=\(.status.storedVersions) spec=\(.spec.versions[].name)"'Step 5 - Pause Kafka Reconciliation
Section titled “Step 5 - Pause Kafka Reconciliation”Pause reconciliation before CRD migration:
kubectl annotate kafka inma-kafka-cluster \-n inma-kafka \strimzi.io/pause-reconciliation="true" \--overwriteVerify:
kubectl get kafka inma-kafka-cluster -n inma-kafka -o yamlStep 6 - Run Strimzi V1 API Conversion
Section titled “Step 6 - Run Strimzi V1 API Conversion”Create the following file:
strimzi-v1-api-conversion.yamlContent:
apiVersion: v1kind: ServiceAccountmetadata: name: strimzi-v1-api-conversion namespace: inma-kafka
---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata: name: strimzi-v1-api-conversionrules: - apiGroups: - kafka.strimzi.io resources: - kafkas - kafkanodepools - kafkaconnects - kafkaconnectors - kafkabridges - kafkamirrormaker2s - kafkarebalances - kafkatopics - kafkausers verbs: - get - list - patch - update
- apiGroups: - core.strimzi.io resources: - strimzipodsets verbs: - get - list - patch - update
- apiGroups: - apiextensions.k8s.io resources: - customresourcedefinitions - customresourcedefinitions/status verbs: - get - list - patch - update
---apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata: name: strimzi-v1-api-conversionsubjects: - kind: ServiceAccount name: strimzi-v1-api-conversion namespace: inma-kafkaroleRef: kind: ClusterRole name: strimzi-v1-api-conversion apiGroup: rbac.authorization.k8s.io
---apiVersion: batch/v1kind: Jobmetadata: name: strimzi-v1-api-conversion namespace: inma-kafka
spec: template: spec: serviceAccountName: strimzi-v1-api-conversion
containers: - name: strimzi-v1-api-conversion image: quay.io/strimzi/operator:1.0.1 command: - /opt/v1-api-conversion/bin/v1-api-conversion.sh - convert-resource
restartPolicy: OnFailureApply:
kubectl apply -f strimzi-v1-api-conversion.yamlMonitor:
kubectl logs job/strimzi-v1-api-conversion -n inma-kafkaStep 7 - Upgrade CRDs After Conversion
Section titled “Step 7 - Upgrade CRDs After Conversion”After all resources are converted, change the Job command:
From:
command: - /opt/v1-api-conversion/bin/v1-api-conversion.sh - convert-resourceTo:
command: - /opt/v1-api-conversion/bin/v1-api-conversion.sh - crd-upgradeRun again:
kubectl apply -f strimzi-v1-api-conversion.yamlStep 8 - Cleanup Conversion Resources
Section titled “Step 8 - Cleanup Conversion Resources”Remove temporary resources:
kubectl delete job strimzi-v1-api-conversion -n inma-kafka
kubectl delete clusterrolebinding strimzi-v1-api-conversion
kubectl delete clusterrole strimzi-v1-api-conversion
kubectl delete serviceaccount strimzi-v1-api-conversion \-n inma-kafkaStep 9 - Resume Kafka Reconciliation
Section titled “Step 9 - Resume Kafka Reconciliation”Enable reconciliation:
kubectl annotate kafka inma-kafka-cluster \-n inma-kafka \strimzi.io/pause-reconciliation- \--overwriteVerify:
kubectl get kafka inma-kafka-cluster -n inma-kafkaStep 10 - Remove Deprecated CRDs
Section titled “Step 10 - Remove Deprecated CRDs”KafkaMirrorMaker
Section titled “KafkaMirrorMaker”Check resources:
kubectl get kafkamirrormakers --all-namespacesIf no resources exist:
kubectl delete crd kafkamirrormakers.kafka.strimzi.ioKafkaConnectS2I
Section titled “KafkaConnectS2I”Check resources:
kubectl get kafkaconnects2is --all-namespacesIf no resources exist:
kubectl delete crd kafkaconnects2is.kafka.strimzi.ioStep 11 - Upgrade to Strimzi v1.0.0
Section titled “Step 11 - Upgrade to Strimzi v1.0.0”Apply CRDs:
kubectl apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/1.0.0/strimzi-crds-1.0.0.yamlUpgrade:
helm repo update
helm upgrade strimzi strimzi/strimzi-kafka-operator \--version 1.0.0 \--namespace inma-kafkaStep 12 - Upgrade to Strimzi v1.0.1
Section titled “Step 12 - Upgrade to Strimzi v1.0.1”Apply CRDs:
kubectl apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/1.0.1/strimzi-crds-1.0.1.yamlUpgrade:
helm repo update
helm upgrade strimzi strimzi/strimzi-kafka-operator \--version 1.0.1 \--namespace inma-kafkaStep 13 - Upgrade to Strimzi v1.1.0
Section titled “Step 13 - Upgrade to Strimzi v1.1.0”Apply CRDs:
kubectl apply -f https://github.com/strimzi/strimzi-kafka-operator/releases/download/1.1.0/strimzi-crds-1.1.0.yamlUpgrade:
helm repo update
helm upgrade strimzi strimzi/strimzi-kafka-operator \--version 1.1.0 \--namespace inma-kafkaFinal Verification
Section titled “Final Verification”Check operator:
kubectl get pods -n inma-kafkaCheck Kafka cluster:
kubectl get kafka inma-kafka-cluster \-n inma-kafkaCheck CRD versions:
kubectl get crd -l app=strimzi \-o custom-columns="NAME:.metadata.name,STORAGE-VERSIONS:.status.storedVersions"Expected result:
- Strimzi Operator version: 1.1.0
- Kafka cluster status: Ready
- No reconciliation errors
- Deprecated CRDs removed
Rollback Notes
Section titled “Rollback Notes”Before starting:
- Keep CRD backups.
- Keep Helm release history.
Check Helm history:
helm history strimzi -n inma-kafkaRollback example:
helm rollback strimzi <REVISION> -n inma-kafkaCRD rollback may not be possible after API conversion. Follow Strimzi compatibility guidance before attempting rollback.