Downgrading Calico
About downgrading Calico
Under some circumstances, you may need to perform a downgrade and return your cluster to the previous version of Calico. If you need to downgrade you should do so as soon as possible to avoid an outage.
Note: After downgrading or aborting the migration it is necessary to delete the previously migrated etcd or Kubernetes API data before re-running the migration.
The downgrade procedure varies according to how you originally installed Calico and your datastore type.
- Follow the steps to Downgrade a self-hosted installation that uses the etcd
datastore
when migration has been done and the Calico components have been
upgraded.
Important: Any pods created after
calico-upgrade complete
and before downgrading will lose networking. - To Downgrade a self-hosted installation that uses the Kubernetes API datastore follow these steps.
Downgrading a self-hosted installation that uses the etcd datastore
If you have upgraded Calico by deploying the latest manifest, follow the steps here to downgrade.
-
Remove any upgraded
calicoctl
instances and install the previouscalicoctl
. -
Use the following command to re-enable the previous Calico components.
calico-upgrade abort
Important: Do not use versions of
calicoctl
v3.x after aborting the upgrade. Doing so may result in unexpected behavior and data. -
Use the following commands to initiate a downgrade of the Calico components.
kubectl rollout undo ds/calico-node -n kube-system kubectl rollout undo deployment/calico-kube-controllers -n kube-system
-
Watch the status of the downgrade as follows. When it reports complete and successful, Calico is downgraded to the previous version.
kubectl rollout status deployment/calico-kube-controllers -n kube-system kubectl rollout status ds/calico-node -n kube-system
Downgrading a self-hosted installation that uses the Kubernetes API datastore
-
Use the following commands to initiate a downgrade of the Calico components.
kubectl rollout undo ds/calico-node -n kube-system
-
Watch the status of the downgrade as follows. When it reports complete and a successful, Calico is downgraded to the previous version.
kubectl rollout status ds/calico-node -n kube-system