...
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
Expand |
---|
title | Set up Proxy für k3s and helm if neccessary |
---|
|
If your server does reach the internet over a proxy only, you have to setup your environment to use this proxy with k3s and helm. This section describes the necessary steps to configure the proxy permanently. 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" |
If you need to pass username and password to the proxy, use Code Block |
---|
export http_proxy="username:password@proxy:port"
export https_proxy="username:password@proxy:port" |
Now commands issued by the user can access the internet. In the install script of k3s, some commands are issued as root user (using sudo). So we have to make sure, that the command called with sudo sees the proxy variables too. To make this sure, call the command
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" |
|
Code Block |
---|
curl -sfL https://get.k3s.io | sh - |
Wait 30 seconds.
You can test it with the command sudo kubectl get node
. It will provide an output similar to this one:
...