Upgrade nodes to Windows Server 2022

You can upgrade your cluster to use Windows Server 2002 nodes in one of two ways. The approach that Mirantis recommends is to join nodes that have a fresh installation of Windows Server 2022, whereas the alternative is to perform an in-place upgrade of existing Windows Server 2019 nodes.

Approach #2: Upgrade existing Windows Server nodes

While it is not recommended, you can upgrade to Windows Server 2022 by performing an in-place upgrade of the existing Windows Server 2019 nodes.

Upgrade existing Windows Server nodes

  1. Log in to the MKE web UI.

  2. In the left-side navigation panel, navigate to Shared Resources > Nodes and select the required Window Server 2019 node.

  3. In the upper right, select the Edit Node icon.

  4. In the Availability section, click Drain.

  5. Click Save to evict the workloads from the node.

  6. Upgrade the node from Windows Server 2019 to Windows Server 2022.

    • Windows full version nodes:

      Connect to the node and use the Windows UI to perform the upgrade. For instructions, refer to Perform an in-place upgrade of Windows Server in the Microsoft documentation.

    • Windows core version nodes:

      1. Mount the ISO for Windows Server 2022.

        If you are using a physical server, insert a drive that has the Windows Server 2022 installation media installed. Otherwise, upload the ISO to the server and mount the image.

        Note

        Windows core version users can mount the ISO in PowerShell using Mount-DiskImage -ImagePath "path".

      2. Navigate to the drive where the ISO is mounted and run setup.exe to launch the setup wizard.

      3. Follow the steps offered in the Microsoft documentation, Perform an in-place upgrade of Windows Server.

  7. Once the upgrade completes, remove all the MKE images on the node and re-pull them. Docker will automatically pull the image versions that are built for Windows Server 2022.

    Note

    To obtain the list of required images, refer to Configure the Docker daemon for Windows nodes.

  8. If ucp-work-agent-win is not running on the node, go to the following section, To troubleshoot the upgrade process.

  9. Return to the MKE web UI.

  10. In the left-side navigation panel, navigate to Shared Resources > Nodes and select the required node.

  11. In the upper right, select the Edit Node icon.

  12. In the Availability section, click Active.

  13. Click Save.

Troubleshoot the upgrade process

  1. If ucp-work-agent-win is not running on the node, use Docker Swarm to rerun the service on the node:

    docker service update ucp-worker-agent-win-x
    

    If ucp-work-agent-win is still not running on the node, it could be due operating system mismatches, which can occur after failing to update registry keys during the Windows upgrade process.

    1. Review the output of the following command, looking for references to Windows Server 2019 or build number 17763:

      Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
      
    2. Update any out-of-date registry keys:

      Set-Itemproperty -path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\' -Name CurrentBuildNumber -value 20348
      
  2. Return to the MKE web UI.

  3. In the left-side navigation panel, navigate to Shared Resources > Nodes and select the required node.

  4. In the upper right, select the Edit Node icon.

  5. In the Availability section, click Active.

  6. Click Save.