I need to run a script on a node shell level (not inside the container) whenever a pod is scheduled or unscheduled on it. I've searched documentation, but found only ways to add hooks running inside containers (https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/, https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes). Does kubernetes have an API I could use to achieve this somehow? Thanks!
This is what you should do