diff --git a/docs/configuration.md b/docs/configuration.md index 30869eb56f8d..ebe16a22738c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -331,6 +331,46 @@ Note that there are several fields that cannot be overridden: [kubelet-config]: https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ +#### Configuration examples + +##### Custom volumePluginDir + +```yaml +spec: + workerProfiles: + - name: custom-pluginDir + values: + volumePluginDir: /var/libexec/k0s/kubelet-plugins/volume/exec +``` + +##### Eviction Policy + +```yaml +spec: + workerProfiles: + - name: custom-eviction + values: + evictionHard: + memory.available: "500Mi" + nodefs.available: "1Gi" + imagefs.available: "100Gi" + evictionMinimumReclaim: + memory.available: "0Mi" + nodefs.available: "500Mi" + imagefs.available: "2Gi" +``` + +##### Unsafe Sysctls + +```yaml +spec: + workerProfiles: + - name: custom-eviction + values: + allowedUnsafeSysctls: + - fs.inotify.max_user_instances +``` + ### `spec.featureGates` Available components are: @@ -345,7 +385,9 @@ If `components` are omitted, propagates to all kube components. Modifies extraArgs. -#### Example +#### Examples + +##### Generic feature gates example ```yaml spec: @@ -359,7 +401,7 @@ spec: enabled: false ``` -#### Kubelet feature gates example +##### Kubelet feature gates example The below is an example of a k0s config with feature gates enabled: @@ -376,46 +418,6 @@ spec: enabled: false ``` -#### Configuration examples - -##### Custom volumePluginDir - -```yaml -spec: - workerProfiles: - - name: custom-pluginDir - values: - volumePluginDir: /var/libexec/k0s/kubelet-plugins/volume/exec -``` - -##### Eviction Policy - -```yaml -spec: - workerProfiles: - - name: custom-eviction - values: - evictionHard: - memory.available: "500Mi" - nodefs.available: "1Gi" - imagefs.available: "100Gi" - evictionMinimumReclaim: - memory.available: "0Mi" - nodefs.available: "500Mi" - imagefs.available: "2Gi" -``` - -##### Unsafe Sysctls - -```yaml -spec: - workerProfiles: - - name: custom-eviction - values: - allowedUnsafeSysctls: - - fs.inotify.max_user_instances -``` - ### `spec.images` Nodes under the `images` key all have the same basic structure: