Upgrade Confluent for Kubernetes¶
Before you start the upgrade process, make sure your Kubernetes cluster is among the Supported Environments for the target version of Confluent for Kubernetes (CFK).
We recommend that you perform this upgrade separate from making other changes to your clusters, such as scaling up, changing configuration, or rotating credentials.
To upgrade CFK:
Disable resource reconciliation.
To prevent Confluent Platform components from rolling restarts, temporarily disable resource reconciliation of the components in each namespace where you have deployed Confluent Platform, specifying the CR kinds and CR names:
kubectl annotate connect connect \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
kubectl annotate controlcenter controlcenter \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
kubectl annotate kafkarestproxy kafkarestproxy \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
kubectl annotate kafka kafka \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
kubectl annotate ksqldb ksqldb \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
kubectl annotate schemaregistry schemaregistry \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
kubectl annotate zookeeper zookeeper \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
Add the CFK Helm repo:
helm repo add confluentinc https://packages.confluent.io/helm
helm repo update
Get the CFK chart.
From the Helm repo:
- To get the latest CFK chart:
helm pull confluentinc/confluent-for-kubernetes --untar
- To get a specific version of the CFK chart, get the image tag of the
CFK version from Confluent for Kubernetes image tags and versions, and specify the version
tag with the
--version
flag:
helm pull confluentinc/confluent-for-kubernetes --version <CFK image tag> --untar
From a download bundle as specified in Deploy Confluent for Kubernetes using the download bundle.
IMPORTANT. Upgrade Confluent Platform custom resource definitions (CRDs):
kubectl apply -f <CFK home>/confluent-for-kubernetes/crds/
This step is required because Helm does not support upgrading or deleting CRDs using Helm. For more information, see the Helm documentation.
If you want to upgrade to a hotfix or a patch version, update the CFK
image.tag
to0.435.67
in yourvalues.yaml
. For example:image: tag: "0.435.67"
Upgrade CFK to 2.3.4.
If you deployed customized CFK using the values file, run the following command to upgrade CFK:
helm upgrade --install confluent-operator \ confluentinc/confluent-for-kubernetes \ --values <path-to-values-file> \ --namespace <namespace>
If you deployed CFK without customizing the values file, run the following command to upgrade CFK:
helm upgrade --install confluent-operator \ confluentinc/confluent-for-kubernetes \ --namespace <namespace>
Alternatively, upgrade CFK to a specific version.
If you deployed CFK using the values file, in your
values.yaml
, update the CFKimage.tag
to the image tag of the CFK version specified in Confluent for Kubernetes image tags and versions:image: tag: "<CFK image tag>"
And run the following command to upgrade CFK:
helm upgrade --install confluent-operator \ confluentinc/confluent-for-kubernetes \ --values <path-to-values-file> \ --namespace <namespace>
If you did not use a customized
values.yaml
for CFK deployment, run the following command to upgrade CFK to a specific version, using the image tag of the CFK version specified in Confluent for Kubernetes image tags and versions:helm upgrade --install confluent-operator \ confluentinc/confluent-for-kubernetes \ --version <CFK image tag> --namespace <namespace>
Enable resource reconciliation for each Confluent Platform components that you disabled reconciliation in the first step above:
kubectl annotate <component CR kind> <cluster name> \ platform.confluent.io/block-reconcile- \ --namespace <namespace>