Updating Calico as the Kubernetes CNI

If Calico is deployed in the Release 1 cluster as Kubernetes CNI, it must be updated so it runs correctly in the Release 2 cluster. This task must be completed before you continue with the upgrade, or the Kubernetes cluster can't start up when being upgraded.

This task updates the existing Calico Tigera operator, and installs it again from the Release 2 application catalog. We recommend you install the latest available version of the Calico Tigera operator listed in the application catalog, which might be a newer release than shown here.

  1. Update the Calico Tigera operator.

    You need to set a release name for the Calico Tigera operator. This example uses calico. Change the release-name=calico entries in this set of commands to use a difference release name for the application. Run the following commands to update the existing operator:

    kubectl -n tigera-operator label ServiceAccount tigera-operator app.kubernetes.io/managed-by=Helm
    kubectl -n tigera-operator annotate ServiceAccount tigera-operator meta.helm.sh/release-name=calico
    kubectl -n tigera-operator annotate ServiceAccount tigera-operator meta.helm.sh/release-namespace=tigera-operator
    
    kubectl -n tigera-operator label ClusterRole tigera-operator app.kubernetes.io/managed-by=Helm
    kubectl -n tigera-operator annotate ClusterRole tigera-operator meta.helm.sh/release-name=calico
    kubectl -n tigera-operator annotate ClusterRole tigera-operator meta.helm.sh/release-namespace=tigera-operator
    
    kubectl -n tigera-operator label ClusterRoleBinding tigera-operator app.kubernetes.io/managed-by=Helm
    kubectl -n tigera-operator annotate ClusterRoleBinding tigera-operator meta.helm.sh/release-name=calico
    kubectl -n tigera-operator annotate ClusterRoleBinding tigera-operator meta.helm.sh/release-namespace=tigera-operator
    
    kubectl -n tigera-operator label Deployment tigera-operator app.kubernetes.io/managed-by=Helm
    kubectl -n tigera-operator annotate Deployment tigera-operator meta.helm.sh/release-name=calico
    kubectl -n tigera-operator annotate Deployment tigera-operator meta.helm.sh/release-namespace=tigera-operator
    
    kubectl label APIServer default app.kubernetes.io/managed-by=Helm
    kubectl annotate APIServer default meta.helm.sh/release-name=calico
    kubectl annotate APIServer default meta.helm.sh/release-namespace=tigera-operator
    
    kubectl label Installation default app.kubernetes.io/managed-by=Helm
    kubectl annotate Installation default meta.helm.sh/release-name=calico
    kubectl annotate Installation default meta.helm.sh/release-namespace=tigera-operator
  2. Search the application catalog for Calico Tigera operator versions.

    Several Calico Tigera operator versions are available to install. We recommend you install the latest version. To see the list of available versions, use:

    ocne catalog search --pattern tigera-operator
  3. Install the Tigera Calico operator from the application catalog.

    For example:

    ocne application install --namespace tigera-operator --release calico --version 1.32.4 --name tigera-operator

    The --release option must be set to the same name used for release-name in the first step. In this example, this is calico.

  4. Validate the Tigera Calico operator installation.
    kubectl describe pod --namespace tigera-operator tigera-operator

    Enter the Tab key to auto complete the name of the tigera-operator pod.

    The output contains the Image option, which shows the Tigera Operator version, is 1.32.4. For example:

        Image:         container-registry.oracle.com/olcne/tigera-operator:v1.32.4

    Check the Tigera Calico operator status using:

    kubectl get tigerastatus

    The output shows the status of the Tigera Calico operator components.