Sysdig - 获取由 k8 pod 触发的系统调用
我想捕获 k8 pod 中的所有系统调用。
Sysdig 支持 -k 标志来指定 kubernetes kubectl api 的 url。 我使用下面的 kubectl proxy 命令公开了 kubectl api
kubectl proxy --port=8080 &
我想过滤名为“mypod”的特定 k8 pod 的系统调用
sudo sysdig -k http://127.0.0.1:8080 k8s.pod.name=mypod
使用此过滤器不会捕获任何事件。还值得注意的是,我从主节点运行此 sysdig 命令,并且“mypod”运行在属于 k8 集群一部分的另一台工作计算机上。
我缺少什么?
I want to capture all system calls from a k8 pod.
Sysdig supports the -k flag for specifying a url to the kubernetes kubectl api.
I exposed the kubectl api using the kubectl proxy command below
kubectl proxy --port=8080 &
I want to filter system calls for a specific k8 pod called 'mypod'
sudo sysdig -k http://127.0.0.1:8080 k8s.pod.name=mypod
No events are captured using this filter. It is also worth noting that I am running this sysdig command from the master node, and that 'mypod' is running on a different worker machine that is a part of the k8 cluster.
what am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Sysdig OSS 应在您要监视的进程/容器所在的同一台计算机上运行。
如果您尝试过滤另一个节点中发生的系统调用,这是不可能的,因为进程永远不会调用另一台机器的内核。
Sysdig OSS 与 Falco 一样,在内核级别工作以监视系统调用。如果您尝试监视 K8S 审核事件,情况会有所不同,因为它们被发送到插件套接字。
Sysdig OSS should run on the same machine where the process/container you want to monitor is.
If you try to filter syscalls that happen in another node it'll be impossible, since a process never calls another machine's kernel.
Sysdig OSS, like Falco, works at the kernel level to monitor syscalls. If you were trying to monitor K8S Audit events that'd be different since they are sent to the plugin socket.