<p>I am trying to deploy an OreintDB cluster with Kubernetes (minikube, specifically). I am using StatefulSet, however, when I use subpaths in volumeMounts declaration for all the OrientDB cluster configs, pods are not created. Although I would like to mount all the configMaps into one folder. ConfigMaps correspond to multiple configuration files required to setup the OrientDB cluster.</p>

<p>The StatefulSet looks like this:</p>

<pre><code>volumeMounts:
    - name: orientdb-config-backups
      mountPath: /orientdb/config
      subPath: backups
    - name: orientdb-config-events
      mountPath: /orientdb/config
      subPath: events
    - name: orientdb-config-distributed
      mountPath: /orientdb/config
      subPath: distributed
    - name: orientdb-config-hazelcast
      mountPath: /orientdb/config
      subPath: hazelcast
    - name: orientdb-config-server
      mountPath: /orientdb/config
      subPath: server
    - name: orientdb-config-client-logs
      mountPath: /orientdb/config
      subPath: client-logs
    - name: orientdb-config-server-logs
      mountPath: /orientdb/config
      subPath: server-log
    - name: orientdb-databases
      mountPath: /orientdb/databases
    - name: orientdb-backup
      mountPath: /orientdb/backup
</code></pre>

<p>Although, when I remove all the subPaths in a StatefulSet, pods are created and config files are placed into separate folders. So StatefulSet looks like this:</p>

<pre><code>volumeMounts:
- name: orientdb-config-backups
  mountPath: /orientdb/config/backups
- name: orientdb-config-events
  mountPath: /orientdb/config/events
- name: orientdb-config-distributed
  mountPath: /orientdb/config/distributed
- name: orientdb-config-hazelcast
  mountPath: /orientdb/config/hazelcast
- name: orientdb-config-server
  mountPath: /orientdb/config/server
- name: orientdb-config-client-logs
  mountPath: /orientdb/config/client-logs
- name: orientdb-config-server-logs
  mountPath: /orientdb/config/server-logs
- name: orientdb-databases
  mountPath: /orientdb/databases
- name: orientdb-backup
  mountPath: /orientdb/backup
- name: orientdb-data
  mountPath: /orientdb/bin/data
</code></pre>

<p>What could be the reason of such behavior?</p>

Cassie
<p>The issue is there is bug in hostpath volume provisioner that encounters an error with "lstat: no such file or directory" if there is subpath field present in deployment/statefulset, even if the field is empty. This error doesn't let statefulset come up and they goes into containerCreatingConfigErr (happened with me on kubeadm)</p>

<p>This issue is present on kubeadm as well where I encountered it.</p>

<p><a href="https://github.com/kubernetes/minikube/issues/2256" rel="nofollow noreferrer">https://github.com/kubernetes/minikube/issues/2256</a></p>
