Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Install k3s

Expand
titleSet up Proxy für for k3s and helm if neccessary

If your server does reach the internet over only reaches the Internet via a proxy only, you have to setup must set up your environment to use so that this proxy is used with k3s and helm. This section describes the necessary steps required to permanently configure the proxy permanently.

  1. Edit the file ~/.bashrc for your deployment user and add the following lines:

    Code Block
    export http_proxy="proxy:port"
    export https_proxy="proxy:port"
    export no_proxy=localhost,.svc,.cluster.local,127.0.0.0/8,<local IP>

    Please replace Replace the placehoder “<local IP>“ with the IP address of your server.

    If you need to pass username and password to the proxy, change the first two lines to

    Code Block
    export http_proxy="username:password@proxy:port"
    export https_proxy="username:password@proxy:port"
  2. In the install k3s installation script of k3s, some commands are issued executed as the root user (using with sudo). So we have to make sure, . We must therefore ensure that the command called with sudo also sees the proxy variables too.
    To make ensure this sure, call the command

    Code Block
    sudo visudo

    and add the following lines to the end of the file:

    Code Block
    Defaults  env_keep += "http_proxy"
    Defaults  env_keep += "https_proxy"
    Defaults  env_keep += "no_proxy"
    Defaults  env_keep += "HTTP_PROXY"
    Defaults  env_keep += "HTTPS_PROXY"
    Defaults  env_keep += "NO_PROXY"
  3. Logout and login Log out and log in again with your user again, so that the file changes in the .bashrc file from step 1 are applied.

Execute the installation of k3s with the command

...