kubernetes容器中的hostPID和hostIPC选项是什么意思? [英] What do hostPID and hostIPC options mean in a kubernetes pod?
问题描述
在kubernetes pod yaml规范文件中,您可以使用hostNetwork:true
将pod设置为使用主机网络.
In kubernetes pod yaml specification file, you can set a pod to use the host machine's network using hostNetwork:true
.
在任何地方都找不到关于hostPID:true
和hostIPC:true
选项含义的很好的解释(适合初学者).假设对Linux网络等知识不多,请有人可以解释一下.谢谢.
I can't find anywhere a good (suitable for a beginner) explanation of what the hostPID:true
and hostIPC:true
options mean. Please could someone explain this, assuming little knowledge in linux networking and such. Thanks.
spec:
template:
metadata:
labels:
name: podName
spec:
hostPID: true
hostIPC: true
hostNetwork: true
containers:
来源: github链接
spec:
template:
metadata:
labels:
name: podName
spec:
hostPID: true
hostIPC: true
hostNetwork: true
containers:
Source: github link here
推荐答案
在 API定义概述
hostPID
-使用主机的pid名称空间.可选:默认为false.
hostPID
- Use the host’s pid namespace. Optional: Default to false.
hostIPC
-使用主机的ipc名称空间.可选:默认为false.
hostIPC
- Use the host’s ipc namespace. Optional: Default to false.
与Pod
的SecurityContext
有关.您可以在.
这篇关于kubernetes容器中的hostPID和hostIPC选项是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!