Files
configpolicy/roles/kubelet/handlers/main.yml
Dustin C. Hatch 96ac5be3b5 r/kubelet: Schedule automatic image prune
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.
2025-10-13 09:54:20 -05:00

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