创建一个容器组 参数 是否必填 参数类型 说明 示例 下级对象 name 是 String 容器名 test image 是 String 容器镜像 nginx:latest imagePullPolicy 否 String 容器镜像拉取策略 Always cpu 否 Float 容器CPU大小 1 memory 否 Float 容器Memory大小 2 gpu 否 Float 容器GPU卡数 1 command 否 Array of Strings 容器启动命令 ["/bin/sh"] args 否 Array of Strings 容器启动参数 ["c","/app"] ports 否 Array of Objects 容器端口 port environmentVar 否 Array of Objects 容器环境变量 environmentVar workingDir 否 String 容器工作目录 /app livenessProbe 否 Object 容器存活探针 livenessProbe readinessProbe 否 Object 容器就绪探针 readinessProbe lifecyclePostStartHandlerExec 否 Array of Strings 容器启动后执行的命令,如果执行失败会重启容器 ["curl", "localhost:80"] lifecyclePreStopHandlerExec 否 Array of Strings 容器停止前执行的命令,如果执行失败会重启容器 ["curl", "localhost:80"] volumeMount 否 Array of Objects 容器内卷挂载信息 volumeMount