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 for each namespace where you have deployed the Confluent Platform component:
Get the components’ custom resource (CR) kinds and names:
kubectl get all --namespace <namespace> | grep platform.confluent.io
The first column of the output contains the resource name in the format:
<CR kind>/<CR name>
.For example, in the following output,
kafka.platform.confluent.io
or shortly,kafka
, is the CR kind, andkafka
is the CR name:kafka.platform.confluent.io/kafka
For each component listed in the previous step, disable the resource reconciliation:
kubectl annotate <component CR kind> <component CR name> \ platform.confluent.io/block-reconcile=true \ --namespace <namespace>
Get the latest CFK chart.
From the Helm repo:
helm repo add confluentinc https://packages.confluent.io/helm
helm repo update
helm pull confluentinc/confluent-for-kubernetes --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.23
in yourvalues.yaml
. For example:image: tag: "0.435.23"
Upgrade CFK to 2.3.1.
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>
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>