- Home
- Release notes
- Upgrade details
Upgrade details#
Before you upgrade to MKE 4.2.2, review the changes on this page, as several
require action before or after the upgrade. MKE 4.2.2 removes the etcd
maintenance HTTP API, removes Flux resource access from the built-in roles,
and stops an MKE 3 upgrade when hosts.yaml does not match the Swarm. If you
upgrade from MKE 4.2.0 or earlier, or from MKE 3, the changes introduced in
MKE 4.2.1 also apply.
Supported upgrade sources#
- From MKE 3: only MKE 3.9.x is supported as a migration source for MKE 4.2.2. Upgrade to MKE 3.9.x first if you are on an earlier MKE 3 release.
- From MKE 4: MKE 4.2.2 upgrades in place from MKE 4.1.3 or any later 4.1.x release, from MKE 4.2.0, and from MKE 4.2.1. Clusters on MKE 4.1.2 or earlier must first upgrade to MKE 4.1.3 or later. The upgrade compatibility check blocks direct upgrades from earlier releases.
Changes in MKE 4.2.2#
MKE 3 to MKE 4 upgrades#
hosts.yamlmust list every node in the MKE 3 Swarm. Before you upgrade, remove from the Swarm any nodes that you do not want to upgrade. Themkectl upgradecommand compareshosts.yamlwith the Swarm and stops before it changes anything if a manager or worker is missing, a listed host is not in the Swarm, or a node is listed twice. The--forceflag does not skip this check.-
The
mkectl apply,mkectl node add, andmkectl upgradecommands check Linux nodes for firewalld, because MKE 4 does not manage firewalld rules. The check affects the commands as follows:- A fresh installation, a node add operation, and an upgrade from MKE 3
fail if firewalld is active or enabled on any checked node. The
mkectl node addcommand checks only the nodes that it adds, and fails even on an existing cluster. - The
mkectl applycommand on an existing cluster logs a warning instead of failing. - Upgrades between MKE 4 versions do not check for firewalld.
MKE 3 automatically adds the pod network to the firewalld
trustedzone, but MKE 4 does not. Before you upgrade from MKE 3, do one of the following on each node:- Stop and disable firewalld.
- Configure firewalld for MKE 4, and then run the
mkectl upgradecommand with the--skip-firewalld-checkflag.
For more information, refer to Configure firewalld.
- A fresh installation, a node add operation, and an upgrade from MKE 3
fail if firewalld is active or enabled on any checked node. The
-
Team and organization grants made in the MKE 3 web UI now migrate to the corresponding organizations and teams. Teams whose grants were made with kubectl, a script, or a GitOps tool can still lose their members. For more information, refer to Known issues.
- MKE 3 grants that migrate as
viewno longer provide access to Flux resources. For more information, refer to Changes in behavior.
MKE 4 to MKE 4 upgrades#
- Before you upgrade, replace every call to
localhost:18088in scripts and automation with the equivalentetcd-maintenancecommand. The etcd maintenance service no longer serves an HTTP API, so these calls fail after the upgrade. For the replacement commands, refer to Changes in behavior. - After the upgrade, users and automation that read or manage Flux resources
through the built-in
view,edit, oradminClusterRoles receiveForbiddenresponses. Grant them an explicit role for the Flux API groups. Grant read access to HelmReleases in thek0rdentnamespace only to cluster administrators. For more information, refer to Changes in behavior. -
With the cloud provider enabled, the
mkectl applyandmkectl node addcommands now keep the cloud provider install flags. Note the following changes in behavior:- On AWS clusters where an earlier
mkectl applyrun removed the flags, themkectl upgradecommand restores them. - Only the
mkectl applycommand enables the cloud provider on an existing cluster. Themkectl node addcommand no longer does so, and it installs the flags on new nodes only if the cloud provider is already enabled. - Each
mkectl applyrun applies thenode.cloudprovider.kubernetes.io/uninitializedtaint to nodes that have no provider ID. These nodes remain unschedulable until the cloud controller manager initializes them. If a node remains tainted, troubleshoot the cloud controller manager instead of removing the taint, because the nextmkectl applyrun reapplies it.
For more information, refer to Cloud providers and Changes in behavior. - The
mkectl node addcommand now refuses to add controllers that would leave etcd with an even number of members. Update scripts that add one controller to a single-controller cluster, or a fourth controller to a three-controller cluster, to pass the--forceflag. - On AWS clusters where an earlier
Airgapped upgrades#
- Upload the full MKE 4.2.2 offline bundle to your registry, as with earlier releases.
- Child cluster nodes at MKE 4.2.2 download oci-downloader from the image registry instead of the management cluster API. Make sure that the oci-downloader binaries artifact is in the registry that the child cluster uses.
Changes from MKE 4.2.1#
If you upgrade from MKE 4.2.0 or earlier, or from MKE 3, the following changes introduced in MKE 4.2.1 also apply.
cgroups v2 is required#
k0s 1.35 requires cgroups v2 on the host. Installs and upgrades now validate this requirement, and hosts that are still on cgroups v1 are rejected. Make sure all nodes are configured for cgroups v2 before you upgrade to MKE 4.2.2.
mkectl backup requires an encryption flag#
Action required before upgrade
Update every script, runbook, and automated job that runs mkectl backup
without an encryption flag. Otherwise, these backups fail after you upgrade
to MKE 4.2.2.
mkectl backup now requires one of the following flags:
--passphrase <value>: Encrypts the backup archive with the specified passphrase.--no-passphrase: Creates an unencrypted backup archive, which matches the default behavior of earlier releases.
Previously, mkectl backup ran without either flag and created an unencrypted
archive. To keep that behavior, add --no-passphrase to your existing
commands:
mkectl backup --no-passphrase
For more information, refer to Create a backup.
Removed flags and changed behavior#
- The
--force-ignore-etcd-v2-dataflag has been removed. The etcd v2 data carried over from MKE 3 is now cleaned up, WAL and data, during migration, which also resolves a class of upgrade failures caused by newer etcd versions rejecting the v2 API. - The internal v2 flag has been removed.
- The
mkectl restorecommand now restores the cluster to a single node, and in-place restore is no longer supported. After the restore completes, add the remaining control plane nodes and Linux worker nodes withmkectl node add, and add the Windows worker nodes withmkectl apply. For more information, refer to Restore. mkectl applyno longer adds or removes control plane nodes on an existing cluster. If the control plane hosts inspec.hostsdo not match the control plane nodes of the cluster, the command fails at theCheck Managers Scaling Requestedphase, before it makes any changes to the cluster. The command also fails for a replacement control plane node that reuses the host name or--hostname-overridevalue of a previous node. To add or remove control plane nodes, usemkectl node addandmkectl node removewith--scope controller+worker. To replace a control plane node, remove the existing node withmkectl node remove, and then add the new node withmkectl node add.mkectl applynow fails on an existing cluster if k0s is installed on a control plane node but is not running on any of the control plane nodes. To resolve the issue, start k0s on the existing control plane nodes or, if you have abandoned the installation, runmkectl reset.mkectl backupnow fails unless--passphraseor--no-passphraseis passed. The same requirement applies tomkectl node addandmkectl node removefor control plane nodes. Any automation that runs these commands must be updated before you upgrademkectl.- Names in
spec.kubelet.tlsCipherSuitesare now validated at apply time.mkectl applyand the MKE operator reject unknown names, which previously passedmkectl applyand left the node in aNotReadystate. Legacy CHACHA20 names that lack the_SHA256suffix are also rejected, and therefore must be renamed before the upgrade. - The k0rdent UI has been removed. It is no longer deployed, the upgrade removes it from clusters on which it is present, and no setting is available to re-enable it.
Tigera Operator version managed by MKE 4#
Starting with MKE 4.2.1, the Calico CNI values.yaml must not set
tigeraOperator.version. Child clusters follow this same rule through MkeChildConfig. For detail on the rule, refer to
Tigera Operator version selection.
-
Upgrading from MKE 4.2.0 or earlier requires no action.
If the configuration stored in the cluster pins an operator version, the upgrade removes the pin. A configuration that pins nothing is left unpinned, as the upgrade never adds the key.
-
Upgrading from MKE 4.2.1 with a pin present fails. This state is unsupported, and the upgrade reports but does not repair it:
Error: failed to upgrade MKE to version <target-version>: failed to patch MKE config for target version <target-version>: unable to run migrations: phase 'Remove pinned tigera-operator version from Calico CNI config' failed: the Calico CNI config carries a pinned tigera-operator version that MKE <source-version> should not have: tigeraOperator.version must not be set (found "<pinned>"): remove the line -- MKE derives the tigera-operator version from the chart it ships (currently <shipped-version>)Where:
<source-version>is the version the cluster is upgrading from.<target-version>is the version the cluster is upgrading to.<shipped-version>is the Tigera Operator version the target release ships.
-
The upgrade does not modify your local configuration file.
MKE 4.2.0 wrote the pin into its own generated Calico values, and as a result your local
mke4.yamlcan carry it even if it was never set deliberately. If yourmke4.yamlpins an operator version, the upgrade succeeds and your nextmkectl applycommand run then fails, using the same file that worked before:pre-flight checks failed (1): ✗ tigera-operator version: invalid Calico CNI configuration: tigeraOperator.version must not be set (found "v1.37.1"): remove the line -- MKE derives the tigera-operator version from the chart it ships (currently v1.40.15)To resolve this, delete the
versionline from the local file, or refresh your local copy with themkectl config getcommand.
NodeLocalDNS with a persisted configuration and a custom service CIDR#
Alert
Action may be required prior to upgrade.
Starting with MKE 4.2.1, MKE derives the kube-dns ClusterIP from
spec.network.serviceCIDR rather than using a fixed default of 10.96.0.10. On
upgrade, the node-local-dns DaemonSet is reconfigured to serve the derived
address.
Clusters that set spec.nodeLocalDNS.nodeLocalConfigPersist: true are affected
when the cluster also uses a non-default service CIDR. With
nodeLocalConfigPersist enabled, MKE does not modify the existing
node-local-dns ConfigMap, as the setting exists so that the Corefile can be
managed outside of MKE. The persisted Corefile therefore continues to bind
10.96.0.10, which is no longer among the addresses the node cache owns, and the
node cache Pods enter a crash loop reporting bind: cannot assign requested
address. The MKE operator logs an error that describes the divergence and the
remediation.
Clusters that use the default service CIDR, 10.96.0.0/12, are unaffected, as
the derived address is the same 10.96.0.10.
This applies to MKE 4 to MKE 4 upgrades, and to MKE 3 to MKE 4 upgrades in which
node_local_dns_config_persist = true carried the MKE 3 ConfigMap over.
To remediate, perform either of the following:
-
After the upgrade, edit the
node-local-dnsConfigMap in thekube-systemnamespace and change everybinddirective tobind 169.254.0.10 <kube-dns-ip>, where<kube-dns-ip>is the ClusterIP of thekube-dnsService. -
Before the upgrade, temporarily set
spec.nodeLocalDNS.nodeLocalConfigPersisttofalseso that MKE regenerates the Corefile. After the upgrade, re-enable the parameter and reapply any custom Corefile changes.
LDAP group search user matchers saved in reverse order#
Alert
Action may be required following upgrade.
Earlier versions of the MKE Dashboard saved the user attribute of an LDAP group
search user matcher as groupAttr, and the group attribute as userAttr. MKE
4.2.1 corrects the form, however it cannot correct values that were saved
previously. As the stored attributes remain reversed, group search can silently
match no users.
Configurations written only through mke4.yaml are unaffected. If, however,
the local mke4.yaml file was refreshed with mkectl config get after LDAP
settings were saved in the MKE Dashboard, the file carries the reversed values
as well.
If LDAP group search was configured through the MKE Dashboard, perform the following steps after the upgrade:
- Navigate to Admin Settings > Authentication > LDAP.
- Swap any reversed user matcher values.
- Click Save.
- If your local
mke4.yamlwas refreshed after the LDAP settings were saved in the MKE Dashboard, correct the user matchers in that file as well.
Inline authentication credentials moved to a Secret#
Alert
Action may be required prior to upgrading child clusters.
Starting with MKE 4.2.1, the inline ldap.bindPW, oidc.clientID, and
oidc.clientSecret parameters are deprecated in MkeConfig and rejected in
MkeChildConfig.
- In
MkeConfig, inline values generate a deprecation warning, andmkectl applymoves them into the authentication credentials Secret. - In
MkeChildConfig, inline values are rejected oncespec.versionis set to4.2.1or later. Before you upgrade a child cluster, move the values to a Secret and reference that Secret throughspec.authentication.credentialsSecretName.
Shorter default login session lifetimes#
Starting with MKE 4.2.1, Dex applies the following token lifetimes when
spec.authentication.expiry is not set:
- ID tokens expire after 1 hour.
- Refresh tokens expire after 4 hours of inactivity, or after 12 hours regardless of activity.
MKE 4.2.0 used the Dex defaults, which issue ID tokens that are valid for 24
hours and refresh tokens that never expire. Users therefore log in more often
following the upgrade. To retain longer token lifetimes, set
spec.authentication.expiry.
VRRP router ID and password change for control plane load balancing#
If spec.network.controlPlaneLoadBalancing.virtualRouterID is not set, the
upgrade changes the VRRP router ID of the cluster from 51 to the last byte of
the primary virtual IP address, and also changes the VRRP password. As the
controllers restart one at a time during the upgrade, the API virtual IP
address can move or become briefly unavailable.
Child clusters remain on their pinned MKE version#
Starting with MKE 4.2.1, upgrading the management cluster no longer rolls child clusters that are pinned to an earlier MKE version. Image tags, bootstrap scripts, the k0s binary, and k0s extension values are all gated by the MKE version of the child cluster. The Sveltos agent Pods on child clusters are, however, still replaced.
MkeChildConfig API changes#
The following changes have been made to the MkeChildConfig API:
- The
airgap.bastionandinfrastructure.cloudNameparameters have been removed. - The
infrastructure.regionparameter is deprecated in favor ofinfrastructure.configuration.region. - The image registry URL and the vSphere
controlPlaneEndpointIPcan no longer be changed after the child cluster is created.
MKE 3 to MKE 4 configuration migration#
The following changes apply to MKE 3 to MKE 4 upgrades:
- Team and organization LDAP sync settings and
noSimplePaginationare migrated. Multiple LDAP user search filters are merged into a single filter, so that no users are dropped. - Directory-wide group-based user searches are not migrated, and the upgrade
prints a warning when it encounters one. Following the upgrade, set
spec.authentication.ldap.groupSearchmanually, and then verify the migrated team and organization group assignments. pre_logon_messageis migrated tospec.authentication.preLogonMessage.- MKE 3 SAML and OIDC proxy settings are not migrated. Set
spec.authentication.proxyfollowing the upgrade. - The MKE 3 backup schedule is migrated. The cron expression is rewritten in
MKE 4 form,
backups_limitbecomesretain, andinclude_logscarries over. If MKE 3 backups were encrypted,mkectl upgradecreates and labels themke-backup-passphraseSecret from the MKE 3 passphrase. If you decline its creation, create the Secret before the first scheduled backup runs. The upgrade fails early if the MKE 3 schedule runs more often than every 5 minutes or uses@every. - MKE 3 clusters that run the Calico eBPF data plane continue to be rejected by the migration.
mkectl upgrade --outputno longer writes MKE 3 secrets, namely the backup passphrase, SCIM token, SAML proxy password, and OIDC client secret, intomke3.tomlorfeatureCompatibilityConfig.toml. The saved files are readable only by their owner.
Offline bundle and registry requirements for airgapped upgrades#
- The etcd 3.5.25
etcdctlandetcdutlbinaries, which are used to clean up old etcd v2 data during upgrades from MKE 4.1.x, are no longer embedded inmkectl. They are now pulled from your registry as theetcdctl-v2andetcdutl-v2artifacts, and placed on the controller nodes byoci-downloader. - Authenticated registries must be served over HTTPS.
mkectlnever sends credentials to a plainhttp://registry, and MKE 4.2.1 does not yet report a clear error in that case. - As the k0rdent UI has been removed, airgapped clusters no longer attempt to send k0rdent UI error reports to sentry.io.