【发布时间】:2020-06-21 14:21:10
【问题描述】:
有没有办法从 Kubernetes pod 访问底层主机/节点的进程,就像我们使用 hostPath 卷挂载访问主机/节点的文件系统一样?
PS:我正在尝试借助在 Kubernetes 上部署为 pod 的 auditbeat 来监控节点进程。
【问题讨论】:
标签: elasticsearch kubernetes elastic-stack elastic-beats
有没有办法从 Kubernetes pod 访问底层主机/节点的进程,就像我们使用 hostPath 卷挂载访问主机/节点的文件系统一样?
PS:我正在尝试借助在 Kubernetes 上部署为 pod 的 auditbeat 来监控节点进程。
【问题讨论】:
标签: elasticsearch kubernetes elastic-stack elastic-beats
我相信你要找的是hostPID: true in the PodSpec:
spec:
hostPID: true
containers:
- name: show-init
command:
- ps
- -p
- "1"
理论上应该输出“/sbin/init”,因为它在主机的 PID 命名空间中运行
【讨论】: