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
Situation
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
andfleet-agent
deployments of the downstream cluster.
Additional Information
- [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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com