有没有一种方法可以从Kubernetes pod访问底层主机/节点的进程,就像我们使用hostPath卷装载访问主机/节点的文件系统一样?
PS:我正在尝试通过在Kubernetes上部署为pod的auditbeat来监控节点进程。
发布于 2020-03-10 15:08:21
我相信你要找的是hostPID: true in the PodSpec
spec:
hostPID: true
containers:
- name: show-init
command:
- ps
- -p
- "1"理论上,应该输出"/sbin/init“,因为它在主机的PID名称空间中运行
https://stackoverflow.com/questions/60604875
复制相似问题