1.pod资源清单详细介绍
#版本号
apiVersion: v1
#资源类型
kind: Pod
#元数据
metadata:
#Pod名字
name: string
#pod所属命名空间
namespace: string
#自定义标签
labels:
#自定义标签名字
- name: string
#自定义注释列表
annotations:
- name: string
#pod中容器的详细定义
spec:
#pod中容器列表
containers:
#容器名称
- name: string
#容器镜像名称
image: string
#获取镜像的策略(Always表示下载镜像,IfNotPresent表示优先使用本地镜像,Never表示仅使用本地镜像)
imagePullPolicy: Always|Never|IfNotPresent
#容器的启动命令列表,如不指定,使用打包时使用的启动命令
command: [string]
#容器的启动命令参数列表
args: [string]
#容器的工作目录
workingDir: string
#挂载到容器内的存储卷位置
volumeMounts:
#引用pod定义的共享存储卷的名称,需用volumes[]部分定义的卷名
- name: string
#存储卷在容器内mount的绝对路径ÿ