diff --git a/docs/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md b/docs/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md
index ca377342025..2092b800be6 100644
--- a/docs/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md
+++ b/docs/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md
@@ -318,6 +318,7 @@ chartValues:
chart-name:
key: value
```
+
### machineGlobalConfig
Specify K3s configurations. Any configuration change made here will apply to every node. The configuration options available in the [standalone version of k3s](https://docs.k3s.io/cli/server) can be applied here.
@@ -331,6 +332,31 @@ machineGlobalConfig:
- key2=value2
```
+To make it easier to put files on nodes beforehand, Rancher expects the following values to be included in the configuration, while K3s expects the values to be entered as file paths:
+- private-registry
+- flannel-conf
+
+Rancher delivers the files to the path `/var/lib/rancher/k3s/etc/config-files/` in target nodes, and sets the proper options in the K3s server.
+
+Example:
+```yaml
+apiVersion: provisioning.cattle.io/v1
+kind: Cluster
+spec:
+ rkeConfig:
+ machineGlobalConfig:
+ private-registry: |
+ mirrors:
+ docker.io:
+ endpoint:
+ - "http://mycustomreg.com:5000"
+ configs:
+ "mycustomreg:5000":
+ auth:
+ username: xxxxxx # this is the registry username
+ password: xxxxxx # this is the registry password
+```
+
### machineSelectorConfig
`machineSelectorConfig` is the same as [`machineGlobalConfig`](#machineglobalconfig) except that a [label](#kubernetes-node-labels) selector can be specified with the configuration. The configuration will only be applied to nodes that match the provided label selector.
@@ -354,6 +380,7 @@ machineSelectorConfig
key1: value1
key2: value2
```
+
### machineSelectorFiles
:::note
diff --git a/docs/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md b/docs/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md
index 116b9379947..27720506b13 100644
--- a/docs/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md
+++ b/docs/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md
@@ -348,6 +348,7 @@ chartValues:
chart-name:
key: value
```
+
### machineGlobalConfig
Specify RKE2 configurations. Any configuration change made here will apply to every node. The configuration options available in the [standalone version of RKE2](https://docs.rke2.io/reference/server_config) can be applied here.
@@ -361,6 +362,31 @@ machineGlobalConfig:
- key2=value2
```
+To make it easier to put files on nodes beforehand, Rancher expects the following values to be included in the configuration, while RKE2 expects the values to be entered as file paths:
+- audit-policy-file
+- cloud-provider-config
+- private-registry
+
+Rancher delivers the files to the path `/var/lib/rancher/rke2/etc/config-files/ ` in target nodes, and sets the proper options in the RKE2 server.
+
+Example:
+```yaml
+apiVersion: provisioning.cattle.io/v1
+kind: Cluster
+spec:
+ rkeConfig:
+ machineGlobalConfig:
+ audit-policy-file:
+ apiVersion: audit.k8s.io/v1
+ kind: Policy
+ rules:
+ - level: RequestResponse
+ resources:
+ - group: ""
+ resources:
+ - pods
+```
+
### machineSelectorConfig
`machineSelectorConfig` is the same as [`machineGlobalConfig`](#machineglobalconfig) except that a [label](#kubernetes-node-labels) selector can be specified with the configuration. The configuration will only be applied to nodes that match the provided label selector.
@@ -384,6 +410,7 @@ machineSelectorConfig
key1: value1
key2: value2
```
+
### machineSelectorFiles
:::note
@@ -440,7 +467,7 @@ machineSelectorFiles:
The secret or configmap must meet the following requirements:
1. It must be in the `fleet-default` namespace where the Cluster object exists.
-2. It must have the annotation `rke.cattle.io/object-authorized-for-clusters: cluster-name1,cluster-name2`, which permits the target clusters to use it.
+2. It must have the annotation `rke.cattle.io/object-authorized-for-clusters: cluster-name1,cluster-name2`, which permits the target clusters to use it.
:::tip
diff --git a/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md b/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md
index ca377342025..2092b800be6 100644
--- a/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md
+++ b/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/k3s-cluster-configuration.md
@@ -318,6 +318,7 @@ chartValues:
chart-name:
key: value
```
+
### machineGlobalConfig
Specify K3s configurations. Any configuration change made here will apply to every node. The configuration options available in the [standalone version of k3s](https://docs.k3s.io/cli/server) can be applied here.
@@ -331,6 +332,31 @@ machineGlobalConfig:
- key2=value2
```
+To make it easier to put files on nodes beforehand, Rancher expects the following values to be included in the configuration, while K3s expects the values to be entered as file paths:
+- private-registry
+- flannel-conf
+
+Rancher delivers the files to the path `/var/lib/rancher/k3s/etc/config-files/ ` in target nodes, and sets the proper options in the K3s server.
+
+Example:
+```yaml
+apiVersion: provisioning.cattle.io/v1
+kind: Cluster
+spec:
+ rkeConfig:
+ machineGlobalConfig:
+ private-registry: |
+ mirrors:
+ docker.io:
+ endpoint:
+ - "http://mycustomreg.com:5000"
+ configs:
+ "mycustomreg:5000":
+ auth:
+ username: xxxxxx # this is the registry username
+ password: xxxxxx # this is the registry password
+```
+
### machineSelectorConfig
`machineSelectorConfig` is the same as [`machineGlobalConfig`](#machineglobalconfig) except that a [label](#kubernetes-node-labels) selector can be specified with the configuration. The configuration will only be applied to nodes that match the provided label selector.
@@ -354,6 +380,7 @@ machineSelectorConfig
key1: value1
key2: value2
```
+
### machineSelectorFiles
:::note
diff --git a/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md b/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md
index 402d426b02c..27720506b13 100644
--- a/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md
+++ b/versioned_docs/version-2.7/reference-guides/cluster-configuration/rancher-server-configuration/rke2-cluster-configuration.md
@@ -348,6 +348,7 @@ chartValues:
chart-name:
key: value
```
+
### machineGlobalConfig
Specify RKE2 configurations. Any configuration change made here will apply to every node. The configuration options available in the [standalone version of RKE2](https://docs.rke2.io/reference/server_config) can be applied here.
@@ -361,6 +362,31 @@ machineGlobalConfig:
- key2=value2
```
+To make it easier to put files on nodes beforehand, Rancher expects the following values to be included in the configuration, while RKE2 expects the values to be entered as file paths:
+- audit-policy-file
+- cloud-provider-config
+- private-registry
+
+Rancher delivers the files to the path `/var/lib/rancher/rke2/etc/config-files/ ` in target nodes, and sets the proper options in the RKE2 server.
+
+Example:
+```yaml
+apiVersion: provisioning.cattle.io/v1
+kind: Cluster
+spec:
+ rkeConfig:
+ machineGlobalConfig:
+ audit-policy-file:
+ apiVersion: audit.k8s.io/v1
+ kind: Policy
+ rules:
+ - level: RequestResponse
+ resources:
+ - group: ""
+ resources:
+ - pods
+```
+
### machineSelectorConfig
`machineSelectorConfig` is the same as [`machineGlobalConfig`](#machineglobalconfig) except that a [label](#kubernetes-node-labels) selector can be specified with the configuration. The configuration will only be applied to nodes that match the provided label selector.
@@ -384,6 +410,7 @@ machineSelectorConfig
key1: value1
key2: value2
```
+
### machineSelectorFiles
:::note