SUSE Support

Here When You Need Us

How to add cluster agent variables to RKE templates

This document (000021192) is provided subject to the disclaimer at the end of this document.

Environment

Rancher 2.6.x, 2.7.x with RKE downstream clusters using RKE templates.

Situation

At this time, it is a known limitation that you cannot specify Agent environment variables via the RKE Template form.
The cluster environment variables can be set using key-value pairs under the agent_env_vars block of the cluster YAML. The example covers adding the proxy environment variables to the agents.

NOTE
If you are making these changes to an existing cluster, ensure you have the authorized cluster endpoint (ACE) enabled for direct access to the cluster if Rancher proxied interactions fail after the change.

Resolution

  • From the Rancher UI, navigate to the Cluster Management section.
  • Click RKE1 configuration > RKE Templates > Add Template or Clone Revision from an existing template.
  • Use the Edit as YAML section from the template to add the configuration and create the agent_env_vars block [1][2][3].
agent_env_vars:
- name: HTTP_PROXY
  value: <>
- name: HTTPS_PROXY
  value: <>
- name: NO_PROXY
  value: <>
  • Save the configuration and apply the template to the required clusters.
  • Verify the environment variables are set in the cattle-cluster-agent and fleet-agent deployments of the downstream cluster. 

Additional Information

References:
  • [1] https://ranchermanager.docs.rancher.com/pages-for-subheaders/about-rke1-templates
  • [2] https://ranchermanager.docs.rancher.com/reference-guides/cluster-configuration/rancher-server-configuration/use-existing-nodes/rancher-agent-options
  • [3] https://ranchermanager.docs.rancher.com/integrations-in-rancher/fleet-gitops-at-scale/use-fleet-behind-a-proxy#required-environment-variables

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.

  • Document ID:000021192
  • Creation Date: 04-Sep-2023
  • Modified Date:18-Oct-2023
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.