adamant-kite-43734
02/19/2026, 9:21 AMfreezing-soccer-22150
02/19/2026, 12:20 PMapiVersion: apps/v1
kind: DaemonSet
metadata:
name: prune-images
namespace: kube-system
spec:
selector:
matchLabels:
app: prune-images
template:
metadata:
labels:
app: prune-images
spec:
hostPID: true
containers:
- name: prune
image: <http://docker.io/dojobits/crictl:v1.35.0|docker.io/dojobits/crictl:v1.35.0>
securityContext:
privileged: true
command:
- sh
- -c
- |
echo "Starting image prune loop"
while true; do
echo "Pruning unused images..."
crictl --runtime-endpoint unix:///run/k3s/containerd/containerd.sock rmi --prune 2>&1
sleep 1d
done
volumeMounts:
- name: run
mountPath: /run
- name: var-run
mountPath: /var/run
restartPolicy: Always
volumes:
- name: run
hostPath:
path: /run
- name: var-run
hostPath:
path: /var/run