<p>The following problem occurs on a Kubernetes cluster with 1 master and 3 nodes and also on a single-machine Kubernetes.</p>

<p>I set up the Kubernetes with flexvolume smb support (<a href="https://github.com/Azure/kubernetes-volume-drivers/tree/master/flexvolume/smb" rel="nofollow noreferrer">https://github.com/Azure/kubernetes-volume-drivers/tree/master/flexvolume/smb</a>). When I apply a new pod with flexvolume the Node mounts the smb share as expected. But the Pod points his share to some docker directory on the Node.</p>

<p>My installation:</p>

<ul>
<li>latest CentOS 7</li>
<li>latest Kubernetes v1.14.0<br>
(<a href="https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/" rel="nofollow noreferrer">https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/</a>)</li>
<li>disabled SELinux and disabled firewall</li>
<li>Docker 1.13.1</li>
<li>jq and cifs-utils</li>
<li><a href="https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/flexvolume/smb/deployment/smb-flexvol-installer/smb" rel="nofollow noreferrer">https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/flexvolume/smb/deployment/smb-flexvol-installer/smb</a> installed to /usr/libexec/kubernetes/kubelet-plugins/volume/exec/microsoft.com~smb and executable</li>
</ul>

<h2>Create Pod with</h2>

<p>smb-secret.yaml</p>

<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: smb-secret
type: microsoft.com/smb
data:
  username: YVVzZXI=
  password: YVBhc3N3b3Jk
</code></pre>

<p>nginx-flex-smb.yaml</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: nginx-flex-smb
spec:
  containers:
  - name: nginx-flex-smb
    image: nginx
    volumeMounts:
    - name: test
      mountPath: /data
  volumes:
  - name: test
    flexVolume:
      driver: "microsoft.com/smb"
      secretRef:
        name: smb-secret
      options:
        source: "//&lt;host.with.smb.share&gt;/kubetest"
        mountoptions: "vers=3.0,dir_mode=0777,file_mode=0777"
</code></pre>

<h2>What happens</h2>

<ul>
<li>Mount point on Node is created on <code>/var/lib/kubelet/pods/bef26895-5ac7-11e9-a668-00155db9c92e/volumes/microsoft.com~smb</code>.</li>
<li><code>mount</code> returns <code>//&lt;host.with.smb.share&gt;/kubetest on /var/lib/kubelet/pods/bef26895-5ac7-11e9-a668-00155db9c92e/volumes/microsoft.com~smb/test type cifs (rw,relatime,vers=3.0,cache=strict,username=aUser,domain=,uid=0,noforceuid,gid=0,noforcegid,addr=172.27.72.43,file_mode=0777,dir_mode=0777,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)</code></li>
<li>read and write works as expected on host and on the Node itself</li>
<li>on Pod

<ul>
<li><code>mount</code>for /data points to <code>tmpfs on /data type tmpfs (rw,nosuid,nodev,seclabel,size=898680k,nr_inodes=224670,mode=755)</code></li>
<li>but the content of the directory /data comes from <code>/run/docker/libcontainerd/8039742ae2a573292cd9f4ef7709bf7583efd0a262b9dc434deaf5e1e20b4002/</code> on the node.</li>
</ul></li>
</ul>

<p>I tried to install the Pod with a PersistedVolumeClaime and get the same problem. Searching for this problem got me no solutions.</p>

<p>Our other pods uses GlusterFS and heketi which works fine.</p>

<p>Is there maybe a configuration failure? Something missing?</p>

<p><strong>EDIT: Solution</strong><br>
I upgraded Docker to the latest validated Version 18.06 and everything works well now.</p>

<p>I upgraded Docker to the latest validated Version 18.06 and everything works well now.</p>

<p>To install it follow the instructions on <a href="https://docs.docker.com/install/linux/docker-ce/centos/" rel="nofollow noreferrer">Get Docker CE for CentOS</a>.</p>
