Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Forked from resouer/pod1.yml
Created November 10, 2015 13:48

Revisions

  1. @resouer resouer renamed this gist Oct 14, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @resouer resouer created this gist Oct 14, 2015.
    32 changes: 32 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    ---
    apiVersion: v1
    kind: Pod
    metadata:
    name: server
    spec:
    containers:
    - image: resouer/sample:v2
    name: war
    lifecycle:
    postStart:
    exec:
    command:
    - "cp"
    - "/sample.war"
    - "/app"
    volumeMounts:
    - mountPath: /app
    name: hostv1
    - name: peer
    image: busybox
    command: ["tail", "-f", "/dev/null"]
    volumeMounts:
    - name: hostv2
    mountPath: /app/sample.war
    volumes:
    - name: hostv1
    hostPath:
    path: /tmp
    - name: hostv2
    hostPath:
    path: /tmp/sample.war