利用kubectl-explain分析可能的API字段
发布时间
阅读量:
阅读量
了解API对象属性的方法
在生成manifest文件的过程中,建议查阅kubernetes官方网站提供的http://kubernetes.io/docs/api参考文档,来了解API对象支持的属性,也可以使用kubectl explain命令相关说明。相较于前者,采用该方式往往能够更加高效地完成操作。
如何使用kubectl explain命令
通过手动编写POD的manifest文件来从头构建,可借助此命令先掌握与pod相关的规格信息:
[jinguang1@m104120196 ~]$ kubectl explain pods
KIND: Pod
VERSION: v1
DESCRIPTION:
Pod is a collection of containers that can run on a host. This resource is
created by clients and scheduled onto hosts.
FIELDS:
apiVersion <string>
APIVersion defines the versioned schema of this representation of an
全部评论 (0)
还没有任何评论哟~
