gpt4 book ai didi

kubernetes - Kubernetes 中的 Pod 可以查看/访问在同一 Pod 中运行的其他容器的进程吗?

转载 作者:行者123 更新时间:2023-12-04 01:57:00 25 4
gpt4 key购买 nike

在 Kubernetes 文档中的此页面 Pods , 它指出

The context of the pod can be defined as the conjunction of several Linux namespaces:

PID namespace (applications within the pod can see each other's processes) network namespace (applications within the pod have access to the same IP and port space)

IPC namespace (applications within the pod can use SystemV IPC or POSIX message queues to communicate)

UTS namespace (applications within the pod share a hostname)



然而,它然后说

In terms of Docker constructs, a pod consists of a colocated group of Docker containers with shared volumes. PID namespace sharing is not yet implemented with Docker.



那么这是否意味着 pod 无法看到其他容器中的进程或在同一 pod 中运行的容器之间执行任何类型的 IPC?我如何向在另一个 Pod 中运行的进程发送信号?

最佳答案

是的,我们希望他们可以共享 PID 命名空间,但是正如您所说,Docker 目前不支持它。一旦我们在 Docker 中获得支持,我们将迅速将其添加到 Kubernetes。

这意味着您不能使用信号向 Pod 中的其他进程发送信号。

但是,您可以使用 IPC 机制,例如管道和共享内存。

关于kubernetes - Kubernetes 中的 Pod 可以查看/访问在同一 Pod 中运行的其他容器的进程吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31953259/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com