当前位置:   article > 正文

K8S一个Yaml执行多个任务_如何在一个yaml写多个job调度

如何在一个yaml写多个job调度

apiVersion: apps/v1
kind: Deployment
metadata:
  name: tomcat-8-memshell-deployment
  labels:
    app: tomcat-8-memshell
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tomcat-8-memshell
  template:
    metadata:
      labels:
        app: tomcat-8-memshell
    spec:
      containers:
      - name: tomcat
        image: le0zh0u/tomcat_8_memshell:latest
        ports:
        - containerPort: 8080
        command: ["catalina.sh","run"]
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tomcat-9-memshell-deployment
  labels:
    app: tomcat-9-memshell
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tomcat-9-memshell
  template:
    metadata:
      labels:
        app: tomcat-9-memshell
    spec:
      containers:
      - name: tomcat
        image: le0zh0u/tomcat_9_memshell:latest
        ports:
        - containerPort: 8080
        command: ["catalina.sh","run"]

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/563789
推荐阅读
相关标签
  

闽ICP备14008679号