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:

  1. 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>
    
  2. Add the CFK Helm repo:

    helm repo add confluentinc https://packages.confluent.io/helm
    
    helm repo update
    
  3. Get the CFK chart.

  4. 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.

  5. If you want to upgrade to a hotfix or a patch version, update the CFK image.tag to 0.435.67 in your values.yaml. For example:

    image:
      tag: "0.435.67"
    
  6. 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>
      
  7. Alternatively, upgrade CFK to a specific version.

    • If you deployed CFK using the values file, in your values.yaml, update the CFK image.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>
      
  8. 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>