Important: RKE add-on install is only supported up to Rancher v2.0.8

Please use the Rancher Helm chart to install Rancher on a Kubernetes cluster. For details, see the Kubernetes Install .

If you are currently using the RKE add-on install method, see Migrating from a Kubernetes Install with an RKE Add-on for details on how to move to using the helm chart.

If you operate Rancher behind a proxy and you want to access services through the proxy (such as retrieving catalogs), you must provide Rancher information about your proxy. As Rancher is written in Go, it uses the common proxy environment variables as shown below.

Make sure NO_PROXY contains the network addresses, network address ranges and domains that should be excluded from using the proxy.

Environment variablePurpose
HTTP_PROXYProxy address to use when initiating HTTP connection(s)
HTTPS_PROXYProxy address to use when initiating HTTPS connection(s)
NO_PROXYNetwork address(es), network address range(s) and domains to exclude from using the proxy when initiating connection(s)

Note NO_PROXY must be in uppercase to use network range (CIDR) notation.

Kubernetes installation

When using Kubernetes installation, the environment variables need to be added to the RKE Config File template.

The environment variables should be defined in the Deployment inside the RKE Config File Template. You only have to add the part starting with env: to (but not including) ports:. Make sure the indentation is identical to the preceding name:. Required values for NO_PROXY are:

  • localhost
  • 127.0.0.1
  • 0.0.0.0
  • Configured service_cluster_ip_range (default: 10.43.0.0/16)

The example below is based on a proxy server accessible at http://192.168.0.1:3128, and excluding usage of the proxy when accessing network range 192.168.10.0/24, the configured service_cluster_ip_range (10.43.0.0/16) and every hostname under the domain example.com. If you have changed the service_cluster_ip_range, you have to update the value below accordingly.

  1. ...
  2. ---
  3. kind: Deployment
  4. apiVersion: extensions/v1beta1
  5. metadata:
  6. namespace: cattle-system
  7. name: cattle
  8. spec:
  9. replicas: 1
  10. template:
  11. metadata:
  12. labels:
  13. app: cattle
  14. spec:
  15. serviceAccountName: cattle-admin
  16. containers:
  17. - image: rancher/rancher:latest
  18. imagePullPolicy: Always
  19. name: cattle-server
  20. env:
  21. - name: HTTP_PROXY
  22. value: "http://192.168.10.1:3128"
  23. - name: HTTPS_PROXY
  24. value: "http://192.168.10.1:3128"
  25. - name: NO_PROXY
  26. value: "localhost,127.0.0.1,0.0.0.0,10.43.0.0/16,192.168.10.0/24,example.com"
  27. ports:
  28. ...