- Home
- Upgrades
- Upgrade an existing MKE 4 cluster
- Perform an MKE 4 to MKE 4+ Upgrade
Perform an MKE 4 to MKE 4+ Upgrade#
Info
A pre-upgrade backup is automatically generated prior to upgrade
initiation. That backup is used only for the automatic
rollback of a failed upgrade. You cannot restore it with
mkectl restore.
-
Back up the cluster with the mkectl binary that currently manages it. Complete the backup before you download the new mkectl binary. For example, to back up an MKE 4.2.1 cluster, use mkectl 4.2.1:
mkectl backup -f <config_file_path> --name <pre-upgrade-backup-name>.tarImportant
Only the mkectl version that creates a backup can restore it. Retain both the backup and the mkectl binary that created it until the upgrade completes successfully.
For more information, refer to Backup.
-
Verify that you have the latest version of the mkectl binary. For information on how to download and install mkectl, refer to Install the MKE 4 CLI.
-
Run the upgrade.
mkectl upgradeNote
You cannot change registry settings during an MKE 4 to MKE 4+ upgrade operation.
Important
Your MKE 4 configuration will mutate during the upgrade to reflect the latest state of the cluster. Thus, you must update your local
mke4.yamlconfiguration file following the upgrade to ensure that it describes the new state. You can do this in one of two ways:-
Include the
--config-outflag with the mkectl upgrade command to automatically refresh themke4.yamlconfiguration file:mkectl upgrade --upgrade-version <version_to_upgrade_to> --config-out ./mke4.yaml
-- OR --
- Run
mkectl config get > mke4.yamlfollowing the upgrade.
-
-
Delete the pre-upgrade backup that
mkectl upgradecreates automatically. This backup is separate from the backup you created in step 1. The command writes it to the directory where you ranmkectl upgradeand reports its name in the output:Pre-upgrade backup taken successfully: <backup-name>The pre-upgrade backup is not encrypted and contains every Secret in the cluster. After the upgrade either completes or rolls back, no process uses this backup. Delete it from the directory where you ran the command:
rm <backup-name>
Failed upgrade rollback
If an upgrade from a previous MKE 4 release fails at any stage, the cluster automatically rolls back to the original version using a backup that is created automatically before the upgrade began.
A support bundle is automatically collected as a result of the rollback operation, which you can use to troubleshoot the upgrade procedure.
If the upgrade fails after the Pre Upgrade Backup step, rollback is initiated, restoring the cluster to the state that was captured by that step. If, though, the failure occurs during the Pre Upgrade Checks step or the Pre Upgrade Backup step, no rollback is performed, as no destructive steps have yet taken place.
Rollback runs in reverse order of the upgrade steps that have been executed.
Recover from a failed rollback
If the upgrade stops and the automatic rollback does not start or does
not finish, restore the cluster from the backup you created in step 1.
Use the mkectl binary that created that backup. A rollback can fail, for
example, when the mkectl process is terminated or the host that runs it
loses power.
Do not take either of these actions:
- Rerun the upgrade. A repeated upgrade does not reliably recover a partially upgraded cluster.
- Restore the pre-upgrade backup that
mkectl upgradecreated.mkectl restorecannot restore it.