In this section, you’ll learn how to enable Fleet in a setup that has a Rancher server with a public IP a Kubernetes cluster that has no public IP, but is configured to use a proxy.

Rancher does not establish connections with registered downstream clusters. The Rancher agent deployed on the downstream cluster must be able to establish the connection with Rancher.

To set up Fleet to work behind a proxy, you will need to set the *Agent Environment Variables * for the downstream cluster. These are cluster-level configuration options.

For public downstream clusters, it is sufficient to

For private nodes or private clusters, the environment variables need to be set on the nodes themselves. Then the environment variables are configured from the Rancher UI, typically when provisioning a custom cluster or when registering the private cluster. For an example of how to set the environment variables on Ubuntu node in a K3s Kubernetes cluster, see this section.

Required Environment Variables

When adding Fleet agent environment variables for the proxy, replace with your private proxy IP.

Setting Environment Variables in the Rancher UI

  1. Click ⋮ > Edit.
  2. Click Advanced Options.
  3. Enter the
  4. Click Save.

Result: The Fleet agent works behind a proxy.

Setting Environment Variables on Private Nodes

For private nodes and private clusters, the proxy environment variables need to be set on the nodes themselves, as well as configured from the Rancher UI.

This example shows how the environment variables would be set up on an Ubuntu node in a K3s Kubernetes cluster: