Skip to content

Commit

Permalink
Add eviction thresholds parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Affan-7 committed Sep 8, 2023
1 parent cb342d9 commit 03f5d43
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions content/en/docs/tasks/administer-cluster/kubelet-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,32 @@ port: 20250
serializeImagePulls: false
evictionHard:
memory.available: "200Mi"
nodefs.available: "10%"
imagefs.available: "15%"
nodefs.inodesFree: "5%"
```
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. Eviction Thresholds: The kubelet will evict Pods under the following conditions:
- When the node's available memory drops below 200MiB.
- 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
evictionHard, the default values of other parameters will not be inherited and
will be set to zero. In order to provide custom values, you should provide all
the threshold values respectively.
---
The `imagefs` is an optional filesystem that container runtimes use to store container
images and container writable layers.
{{< /note >}}

## Start a kubelet process configured via the config file
Expand Down

0 comments on commit 03f5d43

Please sign in to comment.