Sysdig - 获取由 k8 pod 触发的系统调用

发布于 2025-01-14 20:46:45 字数 414 浏览 2 评论 0原文

我想捕获 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浊酒尽余欢 2025-01-21 20:46:45

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文