- 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> --passphrase - --name <pre-upgrade-backup-name>.tar < passphrase-fileImportant
Only the
mkectlbuild that creates a backup can restore it. Retain
the backup and themkectlbinary that created it together, for as long as you retain the backup.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.
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. -
-
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> -
Back up the upgraded cluster with the new
mkectlbinary:mkectl backup -f <config_file_path> --passphrase - --name <post-upgrade-backup-name>.tar < passphrase-fileImportant
The
passphrase-filecontains the passphrase that encrypts the backup. Restrict access to this file and store it securely. You need the passphrase to restore the backup.Backups created before the upgrade, including scheduled backups that remain on the controller nodes, require the earlier
mkectlbinary to restore. Retain that binary for as long as you retain those backups.