Upgrade Calico on OpenShift 4
About upgrading Calico
This page describes how to upgrade to v3.29 for OpenShift 4 from an existing Calico cluster.
Upgrade OwnerReferences
If you do not use OwnerReferences on resources in the projectcalico.org/v3 API group, you can skip this section.
Starting in Calico v3.28, a change in the way UIDs are generated for projectcalico.org/v3 resources requires that you update any OwnerReferences that refer to projectcalico.org/v3 resources as an owner. After upgrade, the UID for all projectcalico.org/v3 resources will be changed, resulting in any owned resources being garbage collected by Kubernetes.
- Remove any OwnerReferences from resources in your cluster that have
apiGroup: projectcalico.org/v3
. - Perform the upgrade normally.
- Add new OwnerReferences to your resources referencing the new UID.
Upgrading Calico on OpenShift 4
Make a manifests directory.
mkdir manifests
Download the Calico manifests for OpenShift and add them to the generated manifests directory:
mkdir calico
wget -qO- https://github.com/projectcalico/calico/releases/download/v3.29.1/ocp.tgz | tar xvz --strip-components=1 -C calico
cp calico/* manifests/
Apply the updated manifests.
oc apply -f manifests/
You can now monitor the upgrade progress with the following command:
watch oc get tigerastatus
If you were upgrading from a version of Calico prior to v3.14 and followed the pre-upgrade steps for host endpoints above, review traffic logs from the temporary policy, add any global network policies needed to allow traffic, and delete the temporary network policy allow-all-upgrade.