Converting Strimzi custom resources to the v1 API
The Strimzi API conversion tool converts custom resources and CRDs from deprecated API versions to v1. You must complete resource conversion and CRD storage upgrade before upgrading to Cloudera Streams Messaging Operator for Kubernetes 1.7.
The v1alpha1, v1beta1, and v1beta2 API
versions for Strimzi Custom Resource Definitions (CRDs) are removed in Cloudera Streams Messaging Operator for Kubernetes 1.7. Only the
kafka.strimzi.io/v1 API is supported. Custom resources that still
use old API versions stop working after upgrading.
The Strimzi API conversion tool handles most of the migration of custom resources and
CRDs to the v1 API automatically, but some changes must be applied
manually before or after running the tool. You have two methods when running the
tool:
-
Running the conversion tool locally — download and run the tool from your machine. Use this method for GitOps and file-based workflows, or when you prefer to run the tool from your machine against a cluster you have
kubectlaccess to. In this method you:- Convert resources using the
convert-filecommand to convert local YAML files, or theconvert-resourcecommand to convert resources straight in a running cluster. - Finalize the CRD storage version using the
crd-upgradecommand.
- Convert resources using the
-
Running the conversion tool as a Kubernetes Job — run the tool inside the cluster using the Strimzi Docker image. Use this method when you cannot run the conversion tool from your local machine. This approach does not require you to download the tool to your local machine. In this method you:
- Convert resources using the
convert-resourcecommand as a Kubernetes Job. - Finalize the CRD storage version using the
crd-upgradecommand as a Kubernetes Job by editing and reapplying the same manifest.
- Convert resources using the
Running the conversion tool locally
Converting custom resource YAML files
Convert Strimzi custom resources from local YAML files to the v1 API using the convert-file command. This approach is suitable for GitOps workflows or environments where direct cluster access is restricted.
-
Java is installed and available in your PATH.
-
Download and extract the Strimzi API conversion tool from the Cloudera Archive. https://archive.cloudera.com/p/csm-operator/1.7/tools/.
-
Back up all custom resources.
-
You have reviewed the manual changes required for your custom resource types. Some manual changes must be applied before running the tool. See Strimzi v1 API configuration changes.
-
The Cloudera Streams Messaging Operator for Kubernetes version deployed in the cluster is 1.6 or later.
Converting custom resources in a Kubernetes cluster
Convert existing Strimzi custom resources directly in a live Kubernetes cluster to the v1 API using the convert-resource command. This command directly updates the resources in the cluster without requiring local YAML files.
-
Java is installed and available in your PATH.
-
Download and extract the Strimzi API conversion tool from the Cloudera Archive. https://archive.cloudera.com/p/csm-operator/1.7/tools/.
-
Back up all custom resources.
-
You have reviewed the manual changes required for your custom resource types. Some manual changes must be applied before running the tool. See Strimzi v1 API configuration changes.
-
The user or service account running the tool has
list,get, andreplacepermissions for all Strimzi custom resources in the target namespaces. -
The Cloudera Streams Messaging Operator for Kubernetes version deployed in the cluster is 1.6 or later.
Upgrading CRD storage version
Upgrade Strimzi Custom Resource Definitions (CRDs) to the v1 storage version using the crd-upgrade command as the final step of the conversion before upgrading to Cloudera Streams Messaging Operator for Kubernetes 1.7.
-
Java is installed and available in your PATH.
-
Download and extract the Strimzi API conversion tool from the Cloudera Archive. https://archive.cloudera.com/p/csm-operator/1.7/tools/.
-
The user or service account running the tool has
patchpermissions for Custom Resource Definitions. -
The Cloudera Streams Messaging Operator for Kubernetes version deployed in the cluster is 1.6 or later.
Running the conversion tool as a Kubernetes Job
Run the Strimzi API conversion tool as a Kubernetes Job to convert custom resources in a cluster without running the tool locally.
Running the conversion tool as a Kubernetes Job is an alternative to running it locally. The tool is embedded in the Strimzi Docker image and can be run as a Kubernetes Job.
Use this approach when you cannot run the conversion tool from your local machine,
or when you prefer to run the conversion entirely within the cluster. You still
need access to apply manifests to the cluster (for example, using
kubectl).
-
You have
kubectlaccess to the cluster and can apply manifests. -
All custom resources are backed up.
-
You have reviewed the manual changes required for your custom resource types. Some manual changes must be applied before running the tool. See Strimzi v1 API configuration changes.
-
In air-gapped environments, ensure the Strimzi Docker image is available in your own registry before proceeding. The image you must mirror is:
container.repository.cloudera.com/cloudera/kafka-operator:1.0.1-csmop-1.7.0-b248 -
The Cloudera Streams Messaging Operator for Kubernetes version deployed in the cluster is 1.6 or later.
Strimzi v1 API configuration changes
Strimzi v1 API configuration changes for custom resources, listing automatic updates applied by the conversion tool and the manual changes you must apply independently.
Manual and automatic changes
Custom resources can be updated for the v1 API in two ways:
- By using the Strimzi API conversion tool to apply supported automatic changes.
- By editing and reapplying resources manually without using the tool.
Even when the conversion tool is used, some changes must still be applied manually because the tool cannot modify or remove unsupported configuration. The reference information below lists which changes the tool applies automatically and which require manual updates.
Manual changes are updates the conversion tool does not apply automatically.
To apply a manual change:
- Edit the affected custom resource.
- Update or remove the required properties.
- Reapply the resource using
kubectl apply -forkubectl replace -f.
Automatic changes are updates the conversion tool applies during conversion. Even when the conversion tool is used, some manual changes are still required.
Kafka
Manual changes required
The conversion tool does not apply the following updates. You must make these changes manually to ensure compatibility:
- Ensure the
.specsection is present (required). - Replace unsupported authentication
type: oauthwithtype: custom. - In
type: customauthentication, remove thesecretsproperty. Mount secrets using thetemplatesection instead. - Replace unsupported authorization types
keycloakandopawithtype: custom. - Remove the
.spec.kafka.resourcesproperty. Define resource requests and limits in KafkaNodePool resources instead.
Automatic changes supported
The following updates are applied automatically by the conversion tool. If the conversion tool is not used, the same changes can be made manually:
- Removes the
.spec.zookeepersection. ZooKeeper-based clusters are not supported. - Removes the
.spec.jmxTranssection. JMXTrans is not supported. - Removes the following Kafka properties:
.spec.kafka.replicas(replicas are configured through KafkaNodePool resources).spec.kafka.storage(storage is configured through KafkaNodePool resources).spec.kafka.template.statefulset
- Removes the following Cruise Control properties:
.spec.cruiseControl.tlsSidecar.spec.cruiseControl.template.tlsSidecarContainer.spec.cruiseControl.brokerCapacity.disk.spec.cruiseControl.brokerCapacity.cpuUtilization
- Removes the
.spec.kafkaExporter.template.serviceproperty. - Removes the following Entity Operator properties:
.spec.entityOperator.tlsSidecar.spec.entityOperator.template.tlsSidecarContainer.spec.entityOperator.topicOperator.topicMetadataMaxAttempts.spec.entityOperator.topicOperator.zookeeperSessionTimeoutSeconds.spec.entityOperator.userOperator.zookeeperSessionTimeoutSeconds
- Replaces
.spec.entityOperator.topicOperator.reconciliationIntervalSecondswith.spec.entityOperator.topicOperator.reconciliationIntervalMs(value multiplied by 1000). - Replaces
.spec.entityOperator.userOperator.reconciliationIntervalSecondswith.spec.entityOperator.userOperator.reconciliationIntervalMs(value multiplied by 1000). - Removes the following status properties from YAML files that include the status
section:
.status.registeredNodeIds.status.kafkaMetadataState.status.listeners[].type
KafkaConnect
Manual changes required
The conversion tool does not apply the following updates. You must make these changes manually to ensure compatibility:
- Ensure the
.specsection is present (required). - Replace unsupported authentication
type: oauthwithtype: custom. - Remove the
.spec.externalConfigurationproperty. Use the.spec.templatesection to add custom volumes or environment variables instead.
Automatic changes supported
The following updates are applied automatically by the conversion tool. If the conversion tool is not used, the same changes can be made manually:
- Adds the
.spec.replicasproperty if missing, defaulting to3. - Renames
.spec.build.output.additionalKanikoOptionsto.spec.build.output.additionalBuildOptions. - Removes the
.spec.template.deploymentproperty. - Removes unsupported tracing
type: jaeger. - Adds the following required properties, setting them from existing configuration
or default values:
.spec.groupId: set from.spec.config.group.id, or defaults toconnect-cluster..spec.configStorageTopic: set from.spec.config.config.storage.topic, or defaults toconnect-cluster-configs..spec.offsetStorageTopic: set from.spec.config.offset.storage.topic, or defaults toconnect-cluster-offsets..spec.statusStorageTopic: set from.spec.config.status.storage.topic, or defaults toconnect-cluster-status.
KafkaNodePool
Manual changes required
- Ensure the
.specsection is present (required).
Automatic changes supported
- Removes the
overridesproperty from.spec.storage. To configure different storage settings for specific nodes, define separate KafkaNodePool resources.
KafkaTopic
Manual changes required
- Ensure the
.specsection is present (required).
No automatic changes are applied by the conversion tool for KafkaTopic resources.
KafkaUser
Manual changes required
- Ensure the
.specsection is present (required).
Automatic changes supported
- Replaces the
operationproperty in.spec.authorization.acls[]with theoperationsarray.
KafkaRebalance
Manual changes required
- Ensure the
.specsection is present (required).
No automatic changes are applied by the conversion tool for KafkaRebalance resources.
KafkaConnector
Manual changes required
- Ensure the
.specsection is present (required).
Automatic changes supported
- Removes the
.spec.pauseproperty. Ifpause: truewas set, it is converted tostate: paused.
StrimziPodSet
StrimziPodSet is an internal resource managed automatically by the Cluster Operator. Conversion is handled by Cloudera Streams Messaging Operator for Kubernetes and does not require user action.
