Skip to content

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.

  1. 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-file
    

    Important

    Only the mkectl build that creates a backup can restore it. Retain
    the backup and the mkectl binary that created it together, for as long as you retain the backup.

    For more information, refer to Backup.

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

  3. Run the upgrade.

    mkectl upgrade
    

    Note

    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.yaml configuration file following the upgrade to ensure that it describes the new state. You can do this in one of two ways:

    • Include the --config-out flag with the mkectl upgrade command to automatically refresh the mke4.yaml configuration file:

      mkectl upgrade --upgrade-version <version_to_upgrade_to> --config-out ./mke4.yaml
      

    -- OR --

    • Run mkectl config get > mke4.yaml following 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.

  4. Delete the pre-upgrade backup that mkectl upgrade creates automatically. This backup is separate from the backup you created in step 1. The command writes it to the directory where you ran mkectl upgrade and 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>
    
  5. Back up the upgraded cluster with the new mkectl binary:

    mkectl backup -f <config_file_path> --passphrase - --name <post-upgrade-backup-name>.tar < passphrase-file
    

    Important

    The passphrase-file contains 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 mkectl binary to restore. Retain that binary for as long as you retain those backups.