Is there a way to access the underlying host/node's process from Kubernetes pod in the same way like we access the host/node's filesystem by using hostPath
volume mount?
PS: I am trying to monitor the node process with the help of auditbeat
deployed as a pod on Kubernetes.
I believe what you are looking for is hostPID: true
in the PodSpec:
spec:
hostPID: true
containers:
- name: show-init
command:
- ps
- -p
- "1"
should, in theory, output "/sbin/init" since it is running in the host's PID namespace