Skip to content

Commit 731237d

Browse files
committed
Document ability to configure workerProfiles
1 parent 65c5bfb commit 731237d

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/reference/embedded-config.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,3 +284,35 @@ spec:
284284
values: |
285285
key: value
286286
```
287+
288+
### Configure Kubelet with k0s Worker Profiles
289+
290+
k0s supports worker profiles, which allow you to configure Kubelet with different settings for different worker nodes. One common use case for setting a worker profile is that you need more pods on a single node than the default limit of 100. In this case, you could define a worker profile to set `maxPods` to 150. Another common example is reducing startup time by setting `maxParallelImagePulls` to increase the maximum number of image pulls that can be done in parallel.
291+
292+
When a worker profile is defined in the Embedded Cluster Config, Embedded Cluster uses the profile for every node in the cluster during initial installation and when joining nodes to the cluster.
293+
294+
You can add a worker profile in the Embedded Cluster Config under `unsupportedOverrides.k0s.config.spec.workerProfiles[]`.
295+
296+
For more information about how to define worker profiles, see [spec.workerProfiles](https://docs.k0sproject.io/stable/configuration/#specworkerprofiles) in the k0s documentation. For a complete list of the available Kubelet configuration options that you can set in a worker profile, see [KubeletConfiguration](https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/#kubelet-config-k8s-io-v1beta1-KubeletConfiguration) in the Kubernetes documentation.
297+
298+
#### Example
299+
300+
```yaml
301+
apiVersion: embeddedcluster.replicated.com/v1beta1
302+
kind: Config
303+
spec:
304+
unsupportedOverrides:
305+
k0s: |
306+
config:
307+
spec:
308+
# Define a default profile that sets maxPods to 150
309+
workerProfiles:
310+
- name: default
311+
values:
312+
maxPods: 150
313+
```
314+
315+
#### Limitations
316+
317+
* The worker profile is set during initial installation. Worker profiles cannot be changed or added on upgrade.
318+
* Embedded Cluster supports only one worker profile that is used for all nodes. If you add more than one worker profile in the `workerProfiles[]` array in the Embedded Cluster Config, only the first profile is used.

0 commit comments

Comments
 (0)