<p>Here my <code>volumeMount</code>:</p>
<pre><code>volumeMounts:
- name: interpreter-spec-volume
  mountPath: /zeppelin/k8s/interpreter
</code></pre>
<p>Here my volumes:</p>
<pre><code>volumes:
- name: interpreter-spec-volume
  configMap:
    name: zeppelin-files
    items:
      - key: interpreter-spec.yaml
        path: interpreter-spec.yaml
</code></pre>
<p>Problem arises how volume is mounted. My volumeMount is mounted as:</p>
<pre><code>kubectl exec -ti zeppelin-759db57cb6-xw42b -- ls -la /zeppelin/k8s/interpreter
total 0
drwxrwxrwx. 3 root root 88 Jul  7 13:18 .
drwxr-xr-x. 3 root root 53 Jun  8 12:12 ..
drwxr-xr-x. 2 root root 35 Jul  7 13:18 ..2020_07_07_13_18_32.149716995
lrwxrwxrwx. 1 root root 31 Jul  7 13:18 ..data -&gt; ..2020_07_07_13_18_32.149716995
lrwxrwxrwx. 1 root root 28 Jul  7 13:18 interpreter-spec.yaml -&gt; ..data/interpreter-spec.yaml
</code></pre>
<p>Why it's mounting <code>..data</code> directory to itself?</p>

<p>What can I say - this is  almost not documented expected behavior. This is due to how secrets and configmaps are mounted into the running container.</p>
<p>When you mount a secret or configmap as volume, the path at which Kubernetes will mount it will contain the root level items symlinking the same names into a ..data directory, which is symlink to real mountpoint.</p>
<p>For example,</p>
<pre><code>kubectl exec -ti zeppelin-759db57cb6-xw42b -- ls -la /zeppelin/k8s/interpreter
total 0
drwxrwxrwx. 3 root root 88 Jul  7 13:18 .
drwxr-xr-x. 3 root root 53 Jun  8 12:12 ..
drwxr-xr-x. 2 root root 35 Jul  7 13:18 ..2020_07_07_13_18_32.149716995
lrwxrwxrwx. 1 root root 31 Jul  7 13:18 ..data -&gt; ..2020_07_07_13_18_32.149716995
lrwxrwxrwx. 1 root root 28 Jul  7 13:18 interpreter-spec.yaml -&gt; ..data/interpreter-spec.yaml
</code></pre>
<p>The real mountpoint (..2020_07_07_13_18_32.149716995 in the example above) will change each time the secret or configmap(in your case) is updated, so the real path of your interpreter-spec.yaml will change after each update.</p>
<p>What you can do is use <a href="https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath" rel="noreferrer">subpath</a> option in <code>volumeMounts</code>. By design, a container using secrets and configmaps as a <a href="https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath" rel="noreferrer">subPath volume mount</a> will not receive updates. You can leverage on this feature to singularly mount files. You will need to change the pod spec each time you add/remove any file to/from the secret / configmap, and a deployment rollout will be required to apply changes after each secret / configmap update.</p>
<pre><code>volumeMounts:
- name: interpreter-spec-volume
  mountPath: /zeppelin/k8s/interpreter
  subPath: interpreter-spec.yaml

volumes:
- name: interpreter-spec-volume
  configMap:
    name: zeppelin-files
</code></pre>
<p>I would also like to mention <a href="https://stackoverflow.com/questions/50685385/kubernetes-config-map-symlinks-data-is-there-a-way-to-avoid-them">Kubernetes config map symlinks (..data/) : is there a way to avoid them?</a> question here, where you may find additional info.</p>
