...
If you don’t have a Kubernetes infrastructure you can set up a single node cluster at a vm. The following section will describe how to set zu such a cluster.
Install k3s
...
title | Set up Proxy for k3s and helm if neccessary |
---|
If your server only reaches the Internet via a proxy, you must set up your environment so that this proxy is used with k3s and helm.
...
If this is the case, follow the instructions in this section:
Expand |
---|
title | Set up Proxy for k3s and helm if neccessary |
---|
|
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> |
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" |
In the k3s installation script, some commands are executed as the root user with sudo. We must therefore ensure that the command called with sudo also sees the proxy variables. To ensure this, call the command 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. Log out and log in again with your user so that the changes in the .bashrc file from step 1 are applied. |
Execute the installation of k3s with the command
...