Updating the Calico Module

If Calico is deployed in the Release 1 cluster as the Calico Module, 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.

Note:

Calico can be installed in Release 1 as either the Kubernetes Container Network Interface (CNI), or using the Calico Module. If Calico is deployed as the Kubernetes CNI, update Calico using the steps in Updating Calico as the Kubernetes CNI. For information on the Calico installation methods in Release 1.9, see Oracle Cloud Native Environment: Calico Module for Release 1.9.

This task removes 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. 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 available versions, use:

    ocne catalog search --pattern tigera-operator
  2. Get information about the Calico Tigera operator.

    Save the information about the Calico Tigera operator to a file. Use:

    ocne application show --namespace tigera-operator --release calico_module_name > filename.yaml

    Replace calico_module_name with the name of Calico module, and filename with the filename to use for the configuration file. For example:

    ocne application show --namespace tigera-operator --release mycalico > calico.yaml
    The output file contains information about the Calico Tigera operator. You use this information to create a Helm configuration file for installing the Calico Tigera operator from the application catalog.
  3. Create a Helm configuration file.

    Edit the YAML file created in the previous step. Delete the first few lines that contain the calico section, for example:

    calico:
      releasename: mycalico
      version: 3.27.5
    Include a line for flexVolumePath: /var/lib/kubelet/volumeplugins/ entry in the installation section:
    installation:
     flexVolumePath: /var/lib/kubelet/volumeplugins/ 
    Include the version number in the tigeraOperator section. We recommend you use the latest version of the Tigera Calico operator that's available in the application catalog, for example:
    tigeraOperator:
      version: v1.32.4    

    Remove the last part of the file after the dashes, for example:

    ----------------
    NAME: mycalico
    NAMESPACE: tigera-operator
    CHART: calico
    STATUS: deployed
    REVISION: 1
    APPVERSION: 3.27.5

    The resulting file might look similar to:

    calicoctl:
      registry: container-registry.oracle.com/olcne
    installation:
      flexVolumePath: /var/lib/kubelet/volumeplugins/      
      calicoNetwork:
        bgp: Disabled
        ipPools:
        - cidr: 10.244.0.0/16
          encapsulation: VXLAN
      cni:
        type: Calico
      imagePath: olcne
      registry: container-registry.oracle.com
    tigeraOperator:
      version: v1.32.4      
      namespace: tigera-operator
      registry: container-registry.oracle.com/olcne
  4. Uninstall the Tigera Calico operator.
    ocne application uninstall --namespace tigera-operator --release calico_module_name
  5. Install the Tigera Calico operator from the application catalog.
    ocne application install --namespace tigera-operator --release calico --values filename.yaml --name tigera-operator

    Where filename is the name of the Helm configuration file.

  6. 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 now 1.32.4. For example:

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

    Check the application configuration:

    ocne application show --namespace tigera-operator --release calico

    The output contains the information used in the configuration file to set up the application. For example:

    calicoctl:
      registry: container-registry.oracle.com/olcne
    installation:
      calicoNetwork:
        bgp: Disabled
        ipPools:
        - cidr: 10.244.0.0/16
          encapsulation: VXLAN
      cni:
        type: Calico
      flexVolumePath: /var/lib/kubelet/volumeplugins/
      imagePath: olcne
      registry: container-registry.oracle.com
    tigeraOperator:
      namespace: tigera-operator
      registry: container-registry.oracle.com/olcne
      version: v1.32.4
    ----------------
    NAME: calico
    NAMESPACE: tigera-operator
    CHART: tigera-operator
    STATUS: deployed
    REVISION: 1
    APPVERSION: 1.32.4

    Check the Tigera Calico operator status using:

    kubectl get tigerastatus

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