相关疑难解决方法(0)

如何使用Kubernetes在一个yaml文件中设置多个命令?

在这个官方文档中,它可以在yaml配置文件中运行命令:

http://kubernetes.io/v1.1/docs/user-guide/configuring-containers.html

apiVersion: v1
kind: Pod
metadata:
  name: hello-world
spec:  # specification of the pod’s contents
  restartPolicy: Never
  containers:
  - name: hello
    image: "ubuntu:14.04"
    env:
    - name: MESSAGE
      value: "hello world"
    command: ["/bin/sh","-c"]
    args: ["/bin/echo \"${MESSAGE}\""]
Run Code Online (Sandbox Code Playgroud)

如果我想运行多个命令,该怎么办?

yaml kubernetes

58
推荐指数
9
解决办法
6万
查看次数

标签 统计

kubernetes ×1

yaml ×1