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
The existing text stating that configuration files "will be used on
install" apparently suggested to some users that config files are NOT
used after installation.
Address that, and tweak the language on drop-in config files a bit.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
Copy file name to clipboardExpand all lines: docs/installation/configuration.md
+4-9Lines changed: 4 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,9 @@ Available as of [v1.19.1+k3s1](https://github.com/k3s-io/k3s/releases/tag/v1.19.
85
85
86
86
In addition to configuring K3s with environment variables and CLI arguments, K3s can also use a config file.
87
87
88
-
By default, values present in a YAML file located at `/etc/rancher/k3s/config.yaml` will be used on install.
88
+
By default, configuration is loaded from `/etc/rancher/k3s/config.yaml`, and drop-in files are loaded from `/etc/rancher/k3s/config.yaml.d/*.yaml` in alphabetical order.
89
+
This path is configurable via the `--config` CLI flag or `K3S_CONFIG_FILE` env var.
90
+
When overriding the default config file name, the drop-in directory path is also modified.
89
91
90
92
An example of a basic `server` config file is below:
91
93
@@ -114,16 +116,9 @@ In general, CLI arguments map to their respective YAML key, with repeatable CLI
114
116
115
117
It is also possible to use both a configuration file and CLI arguments. In these situations, values will be loaded from both sources, but CLI arguments will take precedence. For repeatable arguments such as `--node-label`, the CLI arguments will overwrite all values in the list.
116
118
117
-
Finally, the location of the config file can be changed either through the CLI argument `--config FILE, -c FILE`, or the environment variable `$K3S_CONFIG_FILE`.
118
-
119
119
### Multiple Config Files
120
-
:::info Version Gate
121
-
Available as of [v1.21.0+k3s1](https://github.com/k3s-io/k3s/releases/tag/v1.21.0%2Bk3s1)
122
-
:::
123
-
124
-
Multiple configuration files are supported. By default, configuration files are read from `/etc/rancher/k3s/config.yaml` and `/etc/rancher/k3s/config.yaml.d/*.yaml` in alphabetical order.
125
120
126
-
By default, the last value found for a given key will be used. A `+` can be appended to the key to append the value to the existing string or slice, instead of replacing it. All occurrences of this key in subsequent files will also require a `+` to prevent overwriting the accumulated value.
121
+
If present in multiple files, the last value found for a given key will be used. A `+` can be appended to the key to append the value to the existing string or slice, instead of replacing it. All occurrences of this key in subsequent files will also require a `+` to prevent overwriting the accumulated value.
0 commit comments