<p>Hello I am trying to deploy a simple tomcat service. Below are the details:</p>

<p>1.minikube version: v1.8.1</p>

<p>2.OS: mac</p>

<p>3.The <strong>deployment.yaml</strong> file (I am in the directory of the yaml file)</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: tomcat-deployment
spec:
  selector:
    matchLabels:
      app: tomcat
  replicas: 1
  template:
    metadata:
      labels:
        app: tomcat
    spec:
      containers:
      - name: tomcat
        image: tomcat:9.0
        ports:
        - containerPort: 8080
</code></pre>

<p>4.Commands used to deploy and expose the service</p>

<pre><code>kubectl apply -f deployment.yaml

kubectl expose deployment tomcat-deployment --type=NodePort

minikube service tomcat-deployment --url

curl [URL]
</code></pre>

<p>I get a 404 when I curl the URL. 
I am unsure if there's an issue with the deployment.yaml file or some minikube settings.</p>

Nath
<p>Sara's answer above pointed me to the right direction. Copying the files works but this requires a restart of the tomcat service which reverts the changes. I had to use 'cp -r' on the deployment yaml as per below:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>spec:
      containers:
      - name: tomcat
        image: tomcat
        ports:
        - containerPort: 8080
        volumeMounts:
          - mountPath: /usr/local/tomcat/webapps.dist/manager/META-INF/context.xml
            name: tomcat-configmap
            subPath: context1
          - mountPath: /usr/local/tomcat/webapps.dist/host-manager/META-INF/context.xml
            name: tomcat-configmap
            subPath: context2
            mountPath: /usr/local/tomcat/conf/tomcat-users.xml
            name: tomcat-configmap
            subPath: tomcat-users
        command: ["/bin/bash"]
        args: [ "-c", "cp -r /usr/local/tomcat/webapps.dist/* /usr/local/tomcat/webapps/ &amp;&amp; catalina.sh start; sleep inf" ]
      volumes:
        - name: tomcat-configmap
          configMap:
            name: tomcat-configmap</code></pre>
</div>
</div>
</p>
