Last active
April 20, 2023 08:50
-
-
Save omerlh/cc5724ffeea17917eb06843dbff987b7 to your computer and use it in GitHub Desktop.
A daemonset that print the most heavy files on each node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: disk-checker | |
labels: | |
app: disk-checker | |
spec: | |
selector: | |
matchLabels: | |
app: disk-checker | |
template: | |
metadata: | |
labels: | |
app: disk-checker | |
spec: | |
hostPID: true | |
hostIPC: true | |
hostNetwork: true | |
containers: | |
- resources: | |
requests: | |
cpu: 0.15 | |
securityContext: | |
privileged: true | |
image: busybox | |
imagePullPolicy: IfNotPresent | |
name: disk-checked | |
command: ["/bin/sh"] | |
args: ["-c", "du -a /host | sort -n -r | head -n 20"] | |
volumeMounts: | |
- name: host | |
mountPath: "/host" | |
volumes: | |
- name: host | |
hostPath: | |
path: "/" |
Happy to hear this was solved!
Just passing by, wanted to thanks for the clever solution.
Thank you :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This seems to solve privilages issue when running it on OpenShift cluster: