As pods move around between nodes, applications are updated, etc., nodes tend to accumulate images in their container stores that are no longer used. These take up space unnecessarily, eventually triggering disk usage alarms. From now, the _kubelet_ role installs a systemd timer and service unit to periodically clean up these unused images.
22 lines
371 B
YAML
22 lines
371 B
YAML
- name: load kernel modules
|
|
command:
|
|
/usr/lib/systemd/systemd-modules-load
|
|
|
|
- name: set kernel tunables
|
|
command:
|
|
sysctl --system
|
|
|
|
- name: swapoff -a
|
|
command:
|
|
swapoff -a
|
|
|
|
- name: restart kubelet
|
|
service:
|
|
name: kubelet
|
|
state: restarted
|
|
|
|
- name: restart crictl-image-prune.timer
|
|
systemd:
|
|
name: crictl-image-prune.timer
|
|
state: restarted
|