Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 7 Next »

Contents

Introduction

This document gives information about how to configure k3s with proxy.

Details

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.

  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

The below step requires access to rancher portal, if the team doesnt have access to Rancher then please contact Forcepoint/Getvisibility backend team.

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

  2. Go to Advanced Options:

    1. 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
  3. Run the Rancher registration command: kubectl apply -f https://....yaml

  • No labels