<p>After creating a NFS Persistent Volume for one of Deployments running in a cluster the containers are able to store and share the file data between each other. The file data is persistent between the containers life cycles too. And that's great! But I wonder where exactly is this file data stored: where is it "physically" located? Is it saved onto the container itself or is it saved somewhere onto a VM's disk - the VM that is used to run the Deployment? </p>

<p>The VM that is used to host the Deployment has only 20 Gb available disk space by default. Let's say I am running a Docker container inside a pod on a Node (aka VM) running some file server. What happens if I attempt to transfer a 100 Gb file to that File Server? Where will be this gigantic file saved if the VM disk itself has only 20 Gb available space? </p>

<h3>Edited later by appending the portion of yaml file:</h3>

<pre><code>apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pv-claim
  labels:
    app: deployment
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
# ---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: deployment
spec:
  selector:
    matchLabels:
      app: app
  replicas: 1
  minReadySeconds: 10
  strategy:
    type: RollingUpdate # Recreate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  template:
    metadata:
      labels:
        app: app
    spec:
      containers:
      - name: container
        image: 12345.dkr.ecr.us-west-2.amazonaws.com/container:v001      
        ports:
        - containerPort: 80
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: volume-mount
          mountPath: /data      
      volumes:
      - name: volume-mount
        persistentVolumeClaim:
          claimName: pv-claim
</code></pre>

<p>The "physical" location of the volume is defined by the provisioner, which is defined by the storage class. Your PV claim doesn't have a storage class assigned. That means that the default storage class is used, and it can be anything. I suspect that in EKS default storage class will be EBS, but you should double check that.</p>

<p>First, see what storage class is actually assigned to your persistent volumes:</p>

<pre><code>kubectl get pv -o wide
</code></pre>

<p>Then see what provisioner is assigned to that storage class:</p>

<pre><code>kubectl get storageclass
</code></pre>

<p>Most likely you will see something like <code>kubernetes.io/aws-ebs</code>. Then google documentation for a specific provisioner to understand where the volume is stored "physically".</p>
