k3s agent
In this section, you'll learn how to configure the K3s agent.
Note that servers also run an agent, so all flags listed on this page are also valid for use on servers.
Options are documented on this page as CLI flags, but can also be passed as configuration file options. See the Configuration File documentation for more information on using YAML configuration files.
Logging
Flag | Default | Description |
---|
-v value | 0 | Number for the log level verbosity |
--vmodule value | N/A | Comma-separated list of FILE_PATTERN=LOG_LEVEL settings for file-filtered logging |
--log value, -l value | N/A | Log to file |
--alsologtostderr | N/A | Log to standard error as well as file (if set) |
Cluster Options
Flag | Environment Variable | Description |
---|
--token value, -t value | K3S_TOKEN | Token to use for authentication |
--token-file value | K3S_TOKEN_FILE | Token file to use for authentication |
--server value, -s value | K3S_URL | Server to connect to |
Data
Flag | Default | Description |
---|
--data-dir value, -d value | "/var/lib/rancher/k3s" | Folder to hold state |
Node
Flag | Environment Variable | Description |
---|
--node-name value | K3S_NODE_NAME | Node name |
--with-node-id | N/A | Append id to node name |
--node-label value | N/A | Registering and starting kubelet with set of labels |
--node-taint value | N/A | Registering kubelet with set of taints |
--protect-kernel-defaults | N/A | Kernel tuning behavior. If set, error if kernel tunables are different from kubelet defaults. |
--selinux | K3S_SELINUX | Enable SELinux in containerd |
--lb-server-port value | K3S_LB_SERVER_PORT | Local port for supervisor client load-balancer. If the supervisor and apiserver are not colocated an additional port 1 less than this port will also be used for the apiserver client load-balancer. (default: 6444) |
Runtime