Upgrade Openshift Antrea from 1.13 to 1.15
search cancel

Upgrade Openshift Antrea from 1.13 to 1.15

book

Article ID: 372544

calendar_today

Updated On:

Products

VMware Container Networking with Antrea VMware NSX

Issue/Introduction

Upgrading Antrea from 1.13 to 1.15 or Openshift Antrea 1.8 to 1.9 has a different image path that needs to be followed and adjusted. This will help guide you through those changes to successfully upgrade your cluster.

Environment

Antrea 1.13

Openshift Antrea 1.8

Resolution

  1.  Prepare the manifests and image (antrea-operator/antrea-agent/antrea-interworking) with the new version.

  2.  Update the role with the command oc apply -f role.yaml.

  3.  Upgrade antrea-operator by replacing the old image with the new image.
    1. Edit the deployment with the command oc -n antrea-operator edit deploy antrea-operator. Make sure that the antrea-operator pod is running.

Example of old antrea-operator pod terminating and the new one running.

oc get pods -n antrea-operator
NAME                               READY   STATUS        RESTARTS      AGE
antrea-operator-644f4f8bdb-q7lm8   1/1     Terminating   8 (31m ago)   3d22h
antrea-operator-7d895765f6-kmf79   1/1     Running       0             27s
oc get pods -n antrea-operator
NAME                               READY   STATUS    RESTARTS   AGE
antrea-operator-7d895765f6-kmf79   1/1     Running   0          47s

Next you will upgrade Antrea

  1. First, we need to apply the new CRD definition.

    oc apply -f operator.antrea.vmware.com_antreainstalls_crd.yaml 

    OUTPUT:

    customresourcedefinition.apiextensions.k8s.io/antreainstalls.operator.antrea.vmware.com configured

  2. Edit operator.antrea.vmware.com_v1_antreainstall_cr.yaml with the two new fields

    antreaAgentImage: <Change this to Image Path>
    antreaControllerImage: <Change this to Image Path>

  3. (OPTIONAL) If antrea-interworking is enabled, update interworkingImage with the new antrea-interworking image.

Once the yaml has been edited, you may start the upgrade. 

oc apply -f  operator.antrea.vmware.com_v1_antreainstall_cr.yaml

OUTPUT:

antreainstall.operator.antrea.vmware.com/antrea-install configured


Apply Changes and Check the status.

Make sure that antrea-controller and antrea-agent are running.

Check the version with the following commands.

 

oc get aai -o wide

NAME                                        HEALTHY   LAST HEARTBEAT   VERSION           NODE                                        NUM PODS   SUBNETS

openshift-antrea-lan-7rnt2-master-0         True      20s              v1.15.0-1e409a5   openshift-antrea-lan-7rnt2-master-0         29         ["10.0.0.0/24"]

openshift-antrea-lan-7rnt2-master-1         True      19s              v1.15.0-1e409a5   openshift-antrea-lan-7rnt2-master-1         46         ["10.0.1.0/24"]

openshift-antrea-lan-7rnt2-worker-0-snxz8   True      19s              v1.15.0-1e409a5   openshift-antrea-lan-7rnt2-worker-0-snxz8   13         ["10.0.2.0/24"]

openshift-antrea-lan-7rnt2-worker-0-swzps   True      19s              v1.15.0-1e409a5   openshift-antrea-lan-7rnt2-worker-0-swzps   13         ["10.0.3.0/24"]

 

oc get aci -o wide

NAME                HEALTHY   LAST HEARTBEAT   VERSION           CONNECTED AGENTS   NODE                                        NUM NETWORK POLICIES

antrea-controller   True      27s              v1.15.0-1e409a5   4                  openshift-antrea-lan-7rnt2-worker-0-snxz8