title: Copy command crash pod startup on Kubernetes
body: <p>I'm new with Kubernetes and I'm trying to understand about the commands.
  Basically what I'm trying to do is to create a Tomcat deployment, add an nfs and after that I copy the war file to the tomcat webapps.<br/>
  But its failing</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: webapp11-deployment
  spec:
    replicas: 2
    template:
      metadata:
        labels:
          app: webapp11
      spec:
        volumes:
          - name: www-persistent-storage
            persistentVolumeClaim:
              claimName: claim-webapp11
        containers:
        - name: webapp11-pod
          image: tomcat:8.0
          volumeMounts:
            - name: www-persistent-storage
              mountPath: /apps/build
          command: ["sh","-c","cp /apps/build/v1/sample.war /usr/local/tomcat/webapps"]
          ports:
          - containerPort: 8080
  </code></pre>
  
  <p>As far as I understand when the image when an image has a command, like catalina.sh run on the Tomcat image, it will have a conflict with a command from the kubernetes.<br/>
  Is that correct?<br/>
  There is anyway to run a command after the pod starts?<br/><br/>
  thanks</p>