K8S一个Yaml执行多个任务
metadata:labels:spec:spec:---metadata:labels:spec:spec:
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"]
更多推荐
所有评论(0)