<p>files stored on PV persistent storage by pod application are not visible on host machine. Configuration shows no errors. Config - single pv, pvc, pod.
I am quite new to this environment.</p>

<p>pv:</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: notowania-pv
spec:
  storageClassName: manual
  capacity:
    storage: 10Gi #Size of the volume
  accessModes:
    - ReadWriteOnce #type of access
  hostPath:
    path: "/home/user1684/dane" #host location
</code></pre>

<p>pv status:</p>

<pre><code>NAME           CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                  STORAGECLASS   REASON   AGE
notowania-pv   10Gi       RWO            Retain           Bound    default/notowania-pv   manual                  22m
</code></pre>

<p>pvc:</p>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: notowania-pv
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
</code></pre>

<p>pvc status:</p>

<pre><code>NAME           STATUS   VOLUME         CAPACITY   ACCESS MODES   STORAGECLASS   AGE
notowania-pv   Bound    notowania-pv   10Gi       RWO            manual         24m
</code></pre>

<p>pod:</p>

<pre><code>apiVersion: "apps/v1"
kind: "Deployment"
metadata:
  name: "notowania"
  namespace: "default"
  labels:
    app: "notowania"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: "notowania"
  template:
    metadata:
      labels:
        app: "notowania"
    spec:
      containers:
      - name: "selenium-docker-sha256"
        image: "eu.gcr.io/firstapp-249912/selenium_docker@sha256:da15e666c3472e93979d821c912c2855951e579a91238f35f0e339b85343ed6b"
        volumeMounts:
        - name: notowania
          mountPath: /notowania
      volumes:
      - name: notowania 
        persistentVolumeClaim:
          claimName: notowania-pv
</code></pre>

<p>pod status:</p>

<pre><code>NAME                         READY   STATUS    RESTARTS   AGE
notowania-79d68c8c56-79q55   1/1     Running   0          25m
</code></pre>

<p>files on pod:</p>

<pre><code>user1684@cloudshell:~ (firstapp-249912)$ kubectl exec -it  notowania-79d68c8c56-79q55 -- /bin/bash
root@notowania-79d68c8c56-79q55:/usr/src/app# ll /notowania/
total 8
drwxr-xr-x 2 root root 4096 Sep 18 12:54 ./
drwxr-xr-x 1 root root 4096 Sep 18 12:51 ../
-rw-r--r-- 1 root root    0 Sep 18 12:54 aaa
</code></pre>

<p>files on host:</p>

<pre><code>user1684@cloudshell:~ (firstapp-249912)$ pwd
/home/user1684
user1684@cloudshell:~ (firstapp-249912)$ ll dane
total 8
drwxr-xr-x  2 user1684 user1684 4096 Sep 17 23:13 ./
drwxr-xr-x 15 user1684 user1684 4096 Sep 18 14:47 ../
</code></pre>

<p>So I have no idea why aaa is not visible on the host machine in google cloud - as I think 'aaa' file should be here.</p>

Wojtas.Zet
<p>I think the issue is caused by on what host you examine the directory contents.</p>

<ul>
<li>You've executed the last command on the "cloudshell" VM which is only meant for interacting with GCP and is not a cluster node.</li>
<li>And you should rather inspect it on a cluster node.</li>
<li>To inspect the state of the cluster node you should do something like this:</li>
</ul>

<pre><code>$ gcloud compute instances list 
NAME                                     ZONE            MACHINE_TYPE  PREEMPTIBLE  INTERNAL_IP  EXTERNAL_IP    STATUS
gke-tt-test1-default-pool-a4cf7d86-rgt2  europe-west3-a  g1-small                   10.156.0.2   1.2.3.4  RUNNING

$ gcloud compute ssh gke-tt-test1-default-pool-a4cf7d86-rgt2 

user@gke-tt-test1-default-pool-a4cf7d86-rgt2 ~ $ ls -la /home/user1684/dane
total 8
drwxr-xr-x 2 root root 4096 Sep 18 14:16 .
drwxr-xr-x 3 root root 4096 Sep 18 14:12 ..
-rw-r--r-- 1 root root    0 Sep 18 14:16 aaa

</code></pre>
