Configuring Rancher and Fleet agent to run behind an HTTP proxy
How to configure Rancher and Fleet agent.
Last updated
Was this helpful?
How to configure Rancher and Fleet agent.
Last updated
Was this helpful?
This is applicable when there is a cluster showing as “unavailable“ after the user configured a proxy on the server.
Replace $PROXY_IP
with the IP:PORT of the corporate proxy server and $NODE_IP
with the IP or CIDR of the server running Kubernetes.
Run env
on the user’s server to determine what is the proxy IP. Ensure that the following line is checked:
Open the file /etc/systemd/system/k3s.service.env
and append the following lines:
It is important to use correct IP addresses in the place of placeholders $PROXY_IP and $NODE_IP below.
Restart k3s:
Go to the Rancher dashboard Cluster Management > Clusters and click on Edit Config for the cluster:
a. Go to Advanced Options:
b. Configure the following Agent Environment Variables and press Save:
Remember to use correct IP addresses in the place of placeholders $PROXY_IP and $NODE_IP below.
Run the command:
6. Type letter “i“ to insert text and on the env section, type the following lines:
Example:
Save by pressing Esc and then typing "wq"
Do the same on the fleet-agent by running the command:
Repeat Step 6.
After applying all the changes, wait for the cluster to show as Online on Rancher.
In order for the connectors to support proxy settings, you will need to enable it in the configuration page: