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.

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.

  1. Remove any upgraded calicoctl instances and install the previous calicoctl.

  2. 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.

  3. 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
    
  4. 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

  1. Use the following commands to initiate a downgrade of the Calico components.

    kubectl rollout undo ds/calico-node -n kube-system
    
  2. 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