<p>This is my postgress config for K8s</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: postgres
  template:
    metadata:
      labels:
        component: postgres
    spec:
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: database-persistent-volume-claim
      containers:
      - name: postgres
        image: postgres
        ports:
        - containerPort: 5432
        volumeMounts:
          - mountPath: /var/lib/postgresql/data
            name: postgres-storage
</code></pre>

<p>Following is the event logs</p>

<pre><code>Events:
  Type     Reason     Age                From                     Message
  ----     ------     ----               ----                     -------
  Normal   Scheduled  35s                default-scheduler        Successfully assigned default/postgres-deployment-d57b94d8-qnk8j to docker-desktop
  Normal   Pulling    11s (x3 over 34s)  kubelet, docker-desktop  Pulling image "postgres"
  Normal   Pulled     6s (x3 over 30s)   kubelet, docker-desktop  Successfully pulled image "postgres"
  Normal   Created    6s (x3 over 29s)   kubelet, docker-desktop  Created container postgres
  Warning  Failed     6s (x3 over 29s)   kubelet, docker-desktop  Error: failed to start container "postgres": Error response from daemon: error while creating mount source path '/host_mnt/c/Users/DupinderDhiman/.docker/Volumes/database-persistent-volume-claim/pvc-c8155b21-10d9-11ea-b05a-00155d380104': mkdir /host_mnt/c/Users/DupinderDhiman/.docker: permission denied
</code></pre>

<p>Yeah, I know you will say, share the drives.
I did 
<code>docker run --rm -v c:/Users:/data alpine ls /data</code></p>

<pre><code>All Users
CatalystOne
Default
Default User
DupinderDhiman
Public
desktop.ini
</code></pre>

<p>this command runs very well</p>

<p>So the problem is not related to drive sharing</p>

<p>okay next problem may be related to c:/specificFolder permissions. I did I checked all the checkboxes in sharing permission</p>

<p>Now I am stuck</p>

Dupinder Singh
<p>So after spending some time, I remember I created one user to share drives for <code>Docker</code> with name dockerUser</p>

<p>So the Permission I gave are just for <code>Administrative user</code> My own User <code>DupinderDhiman</code> but not for <code>dockerUser</code> </p>

<p>So Goto C:/user/DupinderDhiman/.docker right click goto properties goto <code>security tab</code> 
Click on <code>Edit</code> button "To change permission, click Edit" and then click the <code>Add</code> button
<a href="https://i.stack.imgur.com/88JQL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/88JQL.png" alt="enter image description here"></a></p>

<p>now click Advance > then on new dialogue find <code>Find</code> button in the bottom you will find one list, find DockerUser > Select it to press okay </p>

<p><a href="https://i.stack.imgur.com/AjSSC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AjSSC.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/6koZ8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6koZ8.png" alt="enter image description here"></a></p>

<p>Okay Okay Okay > apply changes </p>

<p>Close all the open dialogs with okay Apply changes and run the command. See you will not have this error now.</p>
