<p>I am trying to mount a volume to a Pod so that one deployment can write to it, and another deployment can read from it.  I am using MiniKube with Docker on Ubuntu.  I am running <code>./mvnw clean package -Dquarkus.kubernetes.deploy=true</code>.</p>
<p>From the Quarkus documentation, it seems pretty straightforward, but I'm running into trouble.</p>
<p>When I add this line <code>quarkus.kubernetes.mounts.my-volume.path=/volumePath</code> to my application.properties, I get the following error:</p>
<pre class="lang-sh prettyprint-override"><code>[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.6.0.Final:build (default) on project getting-started: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.kubernetes.deployment.KubernetesDeployer#deploy threw an exception: io.dekorate.deps.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://IP:8443/apis/apps/v1/namespaces/default/deployments. Message: Deployment.apps &quot;getting-started&quot; is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: &quot;my-volume&quot;. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.template.spec.containers[0].volumeMounts[0].name, message=Not found: &quot;my-volume&quot;, reason=FieldValueNotFound, additionalProperties={})], group=apps, kind=Deployment, name=getting-started, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Deployment.apps &quot;getting-started&quot; is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: &quot;my-volume&quot;, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
</code></pre>
<p>When I add <code>quarkus.kubernetes.config-map-volumes.my-volume.config-map-name=my-volume</code> (along with the previous statement), the error goes away, but the pod does not start.  Running &quot;kubectl describe pods&quot; returns:</p>
<pre class="lang-sh prettyprint-override"><code>Normal   Scheduled    &lt;unknown&gt;          default-scheduler  Successfully assigned default/getting-started-859d89fc8-tbg6w to minikube
  Warning  FailedMount  14s (x6 over 30s)  kubelet, minikube  MountVolume.SetUp failed for volume &quot;my-volume&quot; : configmap &quot;my-volume&quot; not found
</code></pre>
<p>Does it look like the volume is not being set in the YAML file?</p>
<p>So my question is, how can I set the name of the volume in application.properties, so I can have a volume mounted in the Pod?</p>

mjm
<p>I recommend you look at your <a href="https://quarkus.io/guides/kubernetes#kubernetes" rel="nofollow noreferrer">kubernetes.yml and kubernetes.json files under <code>target/kubernetes</code></a></p>
<p>For the first error. It looks like <code>my-volume</code> needs to exist in your cluster either as a <a href="https://kubernetes.io/docs/concepts/storage/volumes/" rel="nofollow noreferrer">Persistent Volume</a>.</p>
<p>For the second error <code>quarkus.kubernetes.config-map-volumes.my-volume.config-map-name=my-volume</code> is meant to be used as a <a href="https://kubernetes.io/docs/concepts/configuration/configmap/" rel="nofollow noreferrer">ConfigMap</a> so the actual ConfigMap needs to be defined/exist in your cluster.</p>
