在kubernetes pod yaml规范文件中,您可以使用hostNetwork:true
设置pod以使用主机的网络。
我无法找到hostPID:true
和hostIPC:true
选项的含义(适合初学者)。如果对Linux网络等知之甚少,请有人解释一下。感谢。
spec:
template:
metadata:
labels:
name: podName
spec:
hostPID: true
hostIPC: true
hostNetwork: true
containers:
资料来源:github link here
答案 0 :(得分:4)
hostPID
- 使用主机的pid命名空间。可选:默认为false。
hostIPC
- 使用主机的ipc名称空间。可选:默认为false。
这些与SecurityContext
的{{1}}相关。您可以在Pod Security design document中找到更多信息。