How to override the cattle-agent image in troubleshooting with SUSE Rancher Support
This document (000021649) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Rancher v2.9+
Situation
During support investigations, SUSE Rancher support and engineering might propose a hotfix image for Rancher, which contains a potential fix for a specific issue, for troubleshooting purposes.
The usage of a specific hotfix image will deploy the corresponding rancher-agent images in the cattle-cluster-agent deployments downstream within minutes. It is possible to prevent the change of the cattle-cluster-agent image by using the CATTLE_AGENT_IMAGE environment variable in the rancher deployment to pin the version of the agent.
Resolution
Configuration instructions
Consider that you are about to change your Rancher image from v2.9.3 to a hotfix image v2.9.3-hotfix-XYZ. From a machine with access to the upstream cluster, edit the rancher deployment (to change the rancher image to the test version): ``
export AGENT_IMAGE_TAG=v2.9.3
kubectl -n cattle-system set env deployment/rancher CATTLE_AGENT_IMAGE=registry.rancher.com/rancher/rancher-agent:${AGENT_IMAGE_TAG}
This method is intended to temporarily change the CATTLE_AGENT_IMAGE
between upgrades. Alternatively, you can make this change persistent by setting the extraEnv
value in the Rancher Helm chart, which ensures the configuration is retained in the Helm release. However, since this operation is intended for troubleshooting purposes, it is preferable to edit the Rancher deployment directly rather than modifying the Helm chart via the values.yaml
file. This approach prevents any impact on the cattle-cluster-agent
image versioning during a Rancher upgrade.
``
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.