Skip to content

Instantly share code, notes, and snippets.

@resouer
Created August 20, 2016 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save resouer/4db02786190a09e1573a1525cdafe5dc to your computer and use it in GitHub Desktop.
Save resouer/4db02786190a09e1573a1525cdafe5dc to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: javaweb-2
spec:
initContainers:
- name: war
image: resouer/sample:v2
command: ["cp", "/sample.war", "/app"]
volumeMounts:
- mountPath: /app
name: app-volume
containers:
- name: tomcat
image: resouer/mytomcat:7.0
command: ["sh","-c","/root/apache-tomcat-7.0.42-v2/bin/start.sh"]
volumeMounts:
- mountPath: /root/apache-tomcat-7.0.42-v2/webapps
name: app-volume
ports:
- containerPort: 8080
hostPort: 8001
volumes:
- name: app-volume
emptyDir: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment