Kubernetes 清单指南:好的 Resources/Docker 运行 选项

Guide to Kubernetes Manifests: Good Resources/Docker Run options

我想知道是否有关于可在 Kubernetes 清单文件中使用的选项的集中文档;

我知道一般的 YAML 文件有很多,但由于 docker 运行 命令和 kubectl 命令有重叠,我想知道哪些实际上可用于 Kubernetes。

即具体来说 docker 运行 选项包括 --net=host, --pid=host, --privileged

我知道 --privileged 用于 kubernetes 清单中的 securityContext https://kubernetes.io/docs/user-guide/security-context/

containers:
...
  -name:
   ...
   securityContext:
     privileged: true

但至于其他两个,我找不到好的资源来验证这些选项是否可用。

所有选项和字段都记录在您可以在 Kubernetes reference 部分中找到的资源参考中。

例如对于 Pod you can check the related docs, you'll find that everything within the "spec" block relates to PodSpec objects and these contain among others Container definitions. Within the Container 参考的定义,您会找到所有必填和可选字段。

我想这就是您正在寻找的集中文档。

除此之外,您可能还想查看 Container Command and Arguments 参考指南。