Skip to content

Troubleshoot the Upgrade#

You can address various potential MKE upgrade issues using the tips and suggestions detailed herein.

Important

The MKE 3 etcdv3 backend is not supported for upgrade to MKE 4.

Unable to generate upgrade config error#

During the upgrade from MKE 3 to MKE 4, which defaults to the etcdv3 backend, you may receive the following error:

mkectl upgrade --hosts-path hosts.yaml --mke3-admin-username admin --mke3-admin-password <mke_admin_password> -l debug --config-out new-mke4.yaml --external-address <mke4_external_address>
...
Error: unable to generate upgrade config: unsupported configuration for mke4 upgrade: mke3 cluster is using etcdv3 and not kdd backend for calico

To resolve the issue, ensure that:

  • The source is an MKE 3.9 cluster.

    Note

    Starting with MKE 4.2.0, only MKE 3.9.x clusters can be upgraded to MKE 4.2.0 and later. For more information, refer to Upgrade from MKE 3.7, 3.8, or 3.9.

  • The calico_kdd flag in the MKE 3 configuration file is set to true.

  • The configuration is applied to the MKE 3 cluster.

Info

A KDD mode upgrade is irreversible. Thus, to reduce risk, when upgrading enterprise clusters, it is recommended that you work directly with Mirantis to plan the process and monitor it through to completion.

Example output:

$ AUTHTOKEN=$(curl --silent --insecure --data '{"username":"'$MKE_USERNAME'","password":"'$MKE_PASSWORD'"}' https://$MKE_HOST/auth/login | jq --raw-output .auth_token)
$ curl --silent --insecure -X PUT -H "accept: application/toml" -H "Authorization: Bearer $AUTHTOKEN" --upload-file 'mke-config.toml' https://$MKE_HOST/api/ucp/config-toml
{"message":"Calico datastore upgrade from etcd to kdd successful"}

Important

Refer to the Upgrade Prerequisites for information on how to migrate an etcd-backed cluster to KDD.

Tip

In the event of upgrade failure, a support bundle automatically generates in the manager node. You can use this support bundle to help troubleshoot the upgrade procedure.

Example support bundle:

ERR MKE3 upgrade failed due to error: failed to run step [Migrate MKE 3 Nodes]: unable to add the first group of managers to k0s cluster: unable to build and apply after adding nodes: k0sctl apply failed while adding nodes: controller did not reach ready state: context deadline exceeded
readiness endpoint reports "": command failed: client exec: ssh session wait: Process exited with status 1, support dump available in /home/<user-name>/.local/state/mke4-dsinfo/mke4-dsinfo-mke3-upgrade-2025-09-17T20-52-22Z.zip
Error: failed to upgrade MKE to version v4.1.2: failed to run step [Migrate MKE 3 Nodes]: unable to add the first group of managers to k0s cluster: unable to build and apply after adding nodes: k0sctl apply failed while adding nodes: controller did not reach ready state: context deadline exceeded
readiness endpoint reports "": command failed: client exec: ssh session wait: Process exited with status 1

Hosts file does not match the MKE 3 cluster#

Before it logs in to MKE 3 or changes anything on the cluster, mkectl upgrade reads the Swarm membership from a manager node listed in the hosts file that you pass with --hosts-path, and compares that membership with the file. The check also runs with the --dry-run flag, and the --force flag does not skip it. If the file and the cluster do not match, the upgrade stops and reports every mismatch that it finds:

Error: failed to upgrade MKE to version <version>: unable to initialize MKE3 cluster: the hosts file does not match the MKE 3 cluster

The hosts file is missing the following MKE 3 nodes:

  HOSTNAME        ROLE     ADDRESS       NODE ID                    STATUS
  mke3-manager-2  manager  172.31.0.232  8hoakav7kjsxxtiiqnasj8zi9  ready
  mke3-worker-2   worker   172.31.0.148  k18o22n28jtwcke1xra2q1z3a  down

  Every MKE 3 node must be upgraded. Add these nodes to the hosts file, or, if a node
  should not be part of the cluster, remove it from MKE 3 first:
    docker node demote <node-id>    (managers only)
    docker node rm --force <node-id>

The hosts file lists the following hosts, which are not part of the MKE 3 cluster being upgraded:

  ADDRESS    HOSTNAME                NODE ID
  3.99.8.77  other-cluster-worker-1  ph5b2v8t3xqk1sjf0wzd9ng4e

  Remove these hosts from the hosts file.

The hosts file lists the following nodes more than once:

  HOSTNAME        NODE ID                    ADDRESSES
  mke3-manager-3  2y6sqo02ok53v1wl3ofe4mu82  3.96.173.79, mke3-manager-3.example.com

  Keep one entry per node.

The error contains only the sections that apply. To resolve the issue, correct each problem that the error reports, and then run the mkectl upgrade command again:

  • The hosts file is missing the following MKE 3 nodes.

    The upgrade requires every MKE 3 node, manager or worker, to be listed in the hosts file. Without this check, an omitted node would not be upgraded to MKE 4, and the final cleanup step would still remove MKE 3 from it.

    Add each listed node to the hosts file. If a node should not be part of the MKE 4 cluster, remove it from the MKE 3 cluster instead. On a manager node, use the node ID from the error:

    1. If the node is a manager, demote it:

      docker node demote <node-id>
      
    2. Remove the node:

      docker node rm --force <node-id>
      
  • The hosts file lists the following hosts, which are not part of the MKE 3 cluster.

    Remove the listed hosts from the hosts file. The upgrade migrates only the nodes that are members of the MKE 3 cluster. After the upgrade completes, add new nodes as described in Add nodes.

  • The hosts file lists the following nodes more than once.

    Keep one entry per node. Because mkectl matches hosts by their Swarm node ID, a node that is listed by both its IP address and its FQDN is reported as a duplicate.

Upgrade fails the firewalld check#

The upgrade fails at the Pre Upgrade Checks step if firewalld is active or enabled on any Linux node. This check runs before the upgrade migrates any nodes. The error lists the affected nodes:

Error: failed to upgrade MKE to version <version>: failed to run step [Pre Upgrade Checks]: unable to confirm that existing mke3 nodes meet prerequisites for upgrading to MKE 4:
...
No Linux node has firewalld active or enabled
    - firewalld is active or enabled on the following nodes: <node-names>

To resolve the issue:

  1. On each listed node, do one of the following:

    • Stop and disable firewalld:

      sudo systemctl disable --now firewalld
      
    • Configure firewalld for MKE 4. For more information, refer to Configure firewalld.

  2. Run the mkectl upgrade command again. If you configured firewalld on any node instead of disabling it, include the --skip-firewalld-check flag.

Upgrade fails or rolls back on a Windows worker#

Confirm that the Windows worker stays reachable over SSH for throughout the upgrade process, and that the OpenSSH Server service is running and the 4789/UDP port (Calico VXLAN) and 10250/TCP port (kubelet) are open in Windows Defender Firewall.