<p>I hope people can help to point out where is the issue from my deployment file, when i deploy i get error below
Thanks for your help</p>
<pre><code>&quot;Deployment.apps &quot;my-app&quot; is invalid: [spec.template.spec.containers[0].volumeMounts[0].name: Not found: &quot;audioSources&quot;, spec.template.spec.containers[0].volumeMounts[1].name: Not found: &quot;authors&quot;, spec.template.spec.containers[0].volumeMounts[2].name: Not found: &quot;covers&quot;]&quot;
</code></pre>
<p>here is my deployment file</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: my-app
  name: my-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - image: myname/myimage
        name: my-app
        ports:
        - containerPort: 3000
        volumeMounts:
        - name: audioSources
          mountPath: /usr/share/nginx/html/audioSources
        - name: authors
          mountPath: /usr/share/nginx/html/authors
        - name: covers
          mountPath: /usr/share/nginx/html/covers
  volumes:
    - name: audioSources
      hostPath:
        path: /home/websites/audioSources
    - name: authors
      hostPath:
        path: /home/websites/authors
    - name: covers
      hostPath:
        path: /home/websites/covers
</code></pre>

Leean
<p>Here is a fixed deployment:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: my-app
  name: my-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - image: myname/myimage
        name: my-app
        ports:
        - containerPort: 3000
        volumeMounts:
        - name: audio-sources
          mountPath: /usr/share/nginx/html/audioSources
        - name: authors
          mountPath: /usr/share/nginx/html/authors
        - name: covers
          mountPath: /usr/share/nginx/html/covers
      volumes:
      - name: audio-sources
        hostPath:
          path: /home/websites/audioSources
      - name: authors
        hostPath:
          path: /home/websites/authors
      - name: covers
        hostPath:
          path: /home/websites/covers
</code></pre>
<ol>
<li>Volumes should be under <code>spec</code>,same level as <code>containers</code>.</li>
<li>Also, name of <code>audioSource</code> is changed to <code>audio-source</code>.</li>
</ol>
