You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`INSTALL_K3S_SKIP_DOWNLOAD`| If set to true will not download K3s hash or binary. |
31
-
|`INSTALL_K3S_SYMLINK`|If set to 'skip' will not create symlinks, 'force' will overwrite, default will symlink if command does not exist in path. |
31
+
|`INSTALL_K3S_SYMLINK`|By default will create symlinks for the kubectl, crictl, and ctr binaries if the commands do not already exist in path. If set to 'skip' will not create symlinks and 'force' will overwrite. |
32
32
|`INSTALL_K3S_SKIP_START`| If set to true will not start K3s service. |
33
-
|`INSTALL_K3S_VERSION`| Version of K3s to download from github. Will attempt to download the latest version if not specified. |
33
+
|`INSTALL_K3S_VERSION`| Version of K3s to download from Github. Will attempt to download the latest version if not specified. |
34
34
|`INSTALL_K3S_BIN_DIR`| Directory to install K3s binary, links, and uninstall script to, or use `/usr/local/bin` as the default. |
35
35
|`INSTALL_K3S_BIN_DIR_READ_ONLY`| If set to true will not write files to `INSTALL_K3S_BIN_DIR`, forces setting `INSTALL_K3S_SKIP_DOWNLOAD=true`. |
36
36
|`INSTALL_K3S_SYSTEMD_DIR`| Directory to install systemd service and environment files to, or use `/etc/systemd/system` as the default. |
37
37
|`INSTALL_K3S_EXEC`| Command with flags to use for launching K3s in the service. If the command is not specified, and the `K3S_URL` is set, it will default to "agent." If `K3S_URL` not set, it will default to "server." For help, refer to [this example.]({{<baseurl>}}/k3s/latest/en/installation/install-options/how-to-flags/#example-b-install-k3s-exec)|
38
-
|`INSTALL_K3S_NAME`| Name of systemd service to create, will default from the K3s exec command if not specified. If specified the name will be prefixed with 'k3s-'. |
38
+
|`INSTALL_K3S_NAME`| Name of systemd service to create, will default to 'k3s' if running k3s as a server and 'k3s-agent' if running k3s as an agent. If specified the name will be prefixed with 'k3s-'. |
39
39
| `INSTALL_K3S_TYPE` | Type of systemd service to create, will default from the K3s exec command if not specified.
40
40
41
+
41
42
Environment variables which begin with `K3S_` will be preserved for the systemd and openrc services to use.
42
43
43
44
Setting `K3S_URL` without explicitly setting an exec command will default the command to "agent".
44
45
45
46
When running the agent `K3S_TOKEN` must also be set.
46
47
47
-
### Options for Installation from Binary
48
+
#Installing K3s from the Binary
48
49
49
50
As stated, the installation script is primarily concerned with configuring K3s to run as a service. If you choose to not use the script, you can run K3s simply by downloading the binary from our [release page](https://github.com/rancher/k3s/releases/latest), placing it on your path, and executing it. The K3s binary supports the following commands:
Copy file name to clipboardexpand all lines: content/k3s/latest/en/installation/installation-requirements/_index.md
+14-2
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,24 @@ K3s performance depends on the performance of the database. To ensure optimal sp
37
37
38
38
## Networking
39
39
40
-
The K3s server needs port 6443 to be accessible by the nodes. The nodes need to be able to reach other nodes over UDP port 8472 (Flannel VXLAN). If you do not use Flannel and provide your own custom CNI, then port 8472 is not needed by K3s. The node should not listen on any other port. K3s uses reverse tunneling such that the nodes make outbound connections to the server and all kubelet traffic runs through that tunnel.
40
+
The K3s server needs port 6443 to be accessible by the nodes.
41
41
42
-
IMPORTANT: The VXLAN port on nodes should not be exposed to the world as it opens up your cluster network to be accessed by anyone. Run your nodes behind a firewall/security group that disabled access to port 8472.
42
+
The nodes need to be able to reach other nodes over UDP port 8472 when Flannel VXLAN is used. The node should not listen on any other port. K3s uses reverse tunneling such that the nodes make outbound connections to the server and all kubelet traffic runs through that tunnel. However, if you do not use Flannel and provide your own custom CNI, then port 8472 is not needed by K3s.
43
43
44
44
If you wish to utilize the metrics server, you will need to open port 10250 on each node.
45
45
46
+
> **Important:** The VXLAN port on nodes should not be exposed to the world as it opens up your cluster network to be accessed by anyone. Run your nodes behind a firewall/security group that disables access to port 8472.
47
+
48
+
<figcaption>Inbound Rules for K3s Server Nodes</figcaption>
49
+
50
+
| Protocol | Port | Source | Description
51
+
|-----|-----|----------------|---|
52
+
| TCP | 6443 | K3s server nodes | Kubernetes API
53
+
| UDP | 8472 | K3s server and agent nodes | Required only for Flannel VXLAN
54
+
| TCP | 10250 | K3s server and agent nodes | kubelet
55
+
56
+
Typically all outbound traffic is allowed.
57
+
46
58
## Large Clusters
47
59
48
60
Hardware requirements are based on the size of your K3s cluster. For production and large clusters, we recommend using a high-availability setup with an external database. The following options are recommended for the external database in production:
0 commit comments