This guide walks through the process of upgrading AMD GPU drivers on worker nodes.
The driver can be upgraded in the following methods.
Automatic Upgrade Process
Manual Upgrade Process
Automatic upgrade is enabled if the deviceconfig has field upgradePolicy enabled. If this field is not configured, then user has to follow the manual steps as shown in next section If this field is configured and the version field is changed in driver spec, automatic driver upgrade progress is initiated.
The following operations are sequentially executed by the gpu operator for each selected node
The node is cordoned so that no pods can be scheduled on this node
The existing pods (that require amd gpus) are drained/deleted based on the config in the upgrade policy.
The desired driver version label is updated as shown below.
KMM operator unloads the old driver version and loads the new driver version.
If the node requires reboot post installation (configurable in upgradePolicy), the node is rebooted
Once the node is rebooted and the desired driver is loaded, the node is uncordoned and available for scheduling.
The following are the steps to perform the automatic driver upgrade
Set the desired driver version and configure upgrade policy
Track the upgrade status through CR status
The following sample config shows the relevant fields to start automatic driver upgrade across the nodes in the cluster with default upgrade configuration.
Upgrade configuration reference
To check the full spec of upgrade configuration run kubectl get crds deviceconfigs.amd.com -oyaml
enable |
Enable this upgrade policy |
false |
maxParallelUpgrades |
Maximum number of nodes which will be upgraded in parallel |
1 |
maxUnavailableNodes |
Maximum number (or Percentage) of nodes which can be unavailable (cordoned) in the cluster |
25% |
rebootRequired |
Reboot the node after driver upgrade is done. Waits for 60 mins post reboot before declaring as failed |
true |
Warning: When using ROCm drivers version 6.3 and below, a known issue may prevent the driver upgrade from fully completing unless the node is rebooted. As a workaround, we strongly recommend setting the rebootRequired field to true in your upgrade policy. This ensures that a reboot is triggered after the driver upgrade, allowing the new driver to be fully loaded. This workaround should be applied until a permanent fix is provided in a future release.
force |
Allow drain to proceed on the node even if there are managed pods such as daemon-sets. In such cases drain will not proceed unless this option is set to true |
true |
timeout |
The length of time to wait before giving up. Zero means infinite |
300s |
force |
Force delete all pods that use amd gpus |
true |
timeout |
The length of time to wait before giving up. Zero means infinite |
300s |
The status.nodeModuleStatus.<worker-node>.status captures the status of the upgrade process for each node
The following are the different node states during the upgrade process
Install-In-Progress |
Driver is being installed on the node for the first time |
Install-Complete |
Driver install is complete |
Upgrade-Not-Started |
Automatic upgrade enabled and driver version change is detected. All nodes move to this state |
Upgrade-In-Progress |
Selected nodes conforming to upgrade policy will be attempted for driver upgrade |
Upgrade-Complete |
Driver upgrade is successfully complete on the node |
Upgrade-Timed-Out |
Driver upgrade couldn’t finish within 2 hours |
Cordon-Failed |
Cordoning of the node failed |
Uncordon-Failed |
Uncordoning of the node failed |
Drain-Failed |
Drain node or Delete pods operation failed |
Reboot-In-Progress |
Driver upgrade is done and reboot is in progress |
Reboot-Failed |
Driver upgrade is done and reboot attempt failed |
Upgrade-Failed |
Driver upgrade failed for any other reasons |
The following are considered during the automatic upgrade process
Selection of a node should satisfy both maxUnavailableNodes and maxParallelUpgrades criteria
All nodes in failed state is considered while calculating maxUnavailableNodes
If it is observed that the upgrade status is in failed state for a specific node, the user can debug the node, fix it and then add this label to the node to restart upgrade on it. The upgrade state will be reset and it can be tracked as it was before
Command: kubectl label node <nodename> operator.amd.com/gpu-driver-upgrade-state=upgrade-required
Label: operator.amd.com/gpu-driver-upgrade-state: upgrade-required
The manual upgrade process involves the following steps:
Verifying current installation
Updating the driver version
Managing workloads
Updating node labels
Performing the upgrade
Verify the existing driver version label on your worker nodes:
Look for the label in this format:
Example:
Update the driversVersion field in your DeviceConfig:
The operator will automatically:
Look for the new driver image in the registry
Build the image if it doesn’t exist
Push the built image to your specified registry
The operator uses specific tag formats based on the OS:
Ubuntu |
ubuntu-<version>-<kernel>-<driver> |
ubuntu-22.04-6.8.0-40-generic-6.1.3 |
RHEL CoreOS |
coreos-<version>-<kernel>-<driver> |
coreos-416.94-5.14.0-427.28.1.el9_4.x86_64-6.2.2 |
Warning: If a node’s ready status changes during upgrade (Ready → NotReady → Ready) before its driver version label is updated, the old driver won’t be reinstalled. Complete the upgrade steps for these nodes to install the new driver.
Stop all workloads using the AMD GPU driver on the target node before proceeding.
You have two options for updating node labels:
If no additional maintenance is needed, directly update the version label:
Remove old version label:
Perform required maintenance
Add new version label:
After the new driver is installed successfully, restart your GPU workloads on the upgraded node.
To verify the upgrade, check node labels:
Verify driver version:
Check driver status: