/
Configuring Rancher and Fleet agent to run behind a HTTP proxy

Configuring Rancher and Fleet agent to run behind a HTTP proxy

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.

If you ran the Rancher registration command before configuring the Agent Environment Variables (see step 3) you’ll need to re-run the registration command after configuring the environment variables.

Configure VM environment

  1. Open the file /etc/systemd/system/k3s.service.env and append the following lines:

    http_proxy="$PROXY_IP" https_proxy="$PROXY_IP" no_proxy="$NODE_IP,localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local"
  2. Restart k3s systemctl restart k3s.service

Configure Rancher

  1. Go to the Rancher dashboard Cluster Management > Clusters and click on Edit Config for your cluster:

    1. Go to Advanced Options:

    2. Configure the following Agent Environment Variables and press Save:

      HTTP_PROXY: $PROXY_IP HTTPS_PROXY: $PROXY_IP NO_PROXY: $NODE_IP,localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,.svc,.cluster.local

Configure Dashboard

In order for the connectors to support proxy settings, you will need to enable it in the configuration page

 

 

 

 

Related content

Configuring Rancher and Fleet agent to run behind a HTTP proxy if cluster was previously registered
Configuring Rancher and Fleet agent to run behind a HTTP proxy if cluster was previously registered
More like this
K3s Installation
K3s Installation
Read with this
Prerequisites for k3s on RHEL/CentOS/Oracle Linux
Prerequisites for k3s on RHEL/CentOS/Oracle Linux
Read with this

Classified as Getvisibility - Partner/Customer Confidential