Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eviction thresholds parameters #42702

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions content/en/docs/tasks/administer-cluster/kubelet-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,22 @@ address: "192.168.0.8"
port: 20250
serializeImagePulls: false
evictionHard:
memory.available: "200Mi"
memory.available: "100Mi"
nodefs.available: "10%"
nodefs.inodesFree: "5%"
Affan-7 marked this conversation as resolved.
Show resolved Hide resolved
imagefs.available: "15%"
```

In the example, the kubelet is configured to serve on IP address 192.168.0.8 and port 20250, pull images in parallel,
and evict Pods when available memory drops below 200Mi. Since only one of the four evictionHard thresholds is configured,
other evictionHard thresholds are reset to 0 from their built-in defaults.
All other kubelet configuration values are left at their built-in defaults, unless overridden
by flags. Command line flags which target the same value as a config file will override that value.
In this example, the kubelet is configured with the following settings:

1. `address`: The kubelet will serve on IP address `192.168.0.8`.
2. `port`: The kubelet will serve on port `20250`.
3. `serializeImagePulls`: Image pulls will be done in parallel.
4. `evictionHard`: The kubelet will evict Pods under one of the following conditions:
- When the node's available memory drops below 100MiB.
- When the node's main filesystem's available space is less than 10%.
- When the image filesystem's available space is less than 15%.
- When more than 95% of the node's main filesystem's inodes are in use.

{{< note >}}
In the example, by changing the default value of only one parameter for
Expand All @@ -51,6 +59,9 @@ will be set to zero. In order to provide custom values, you should provide all
the threshold values respectively.
{{< /note >}}

The `imagefs` is an optional filesystem that container runtimes use to store container
images and container writable layers.
Affan-7 marked this conversation as resolved.
Show resolved Hide resolved

## Start a kubelet process configured via the config file

{{< note >}}
Expand Down