<p>How to have the input data ready before I deploy a POD on K8S? 
As I understand, persistent volume is dynamically created using PVC (persistent volume claim), so in a POD yaml file, we can set the PVC and mount path like <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#claims-as-volumes" rel="nofollow noreferrer">this</a>: </p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
    - name: myfrontend
      image: nginx
      volumeMounts:
      - mountPath: "/var/www/html"
        name: mypd
  volumes:
    - name: mypd
      persistentVolumeClaim:
        claimName: myclaim
</code></pre>

<p>The problem is, how can I upload the data before I deploy a POD? What I want is to have the data ready and persistent somewhere on K8S, and then when I deploy the POD, and expose it as service, the service can immediately access the data. </p>

Jaylin
<p>According to your description, you need is a persistent volume. An example of this would be a NFS persistence for which you would define the following yaml.</p>

<pre><code>---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: $PV_NAME
  namespace: $NAMESPACE
spec:
  storageClassName: manual
  capacity:
    storage: 1Gi
  accessModes:
  - ReadWriteOnce
  nfs:
    path: /nfs
    server: $SERVER_ADDRESS # 10.128.15.222 for instance
  persistentVolumeReclaimPolicy: Retain

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: $PVC_NAME
  creationTimestamp: null
  labels:
    app: $PVC_NAME
  namespace: $NAMESPACE
spec:
  storageClassName: manual
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
</code></pre>

<p>After creating a PV and PVC, you would mount it in a deployment like this.</p>

<pre><code>---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: $POD_NAME
  labels:
    app: $POD_NAME
  namespace: $NAMESPACE
spec:
  replicas: 1
  selector:
    matchLabels:
      app: $POD_NAME
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: $POD_NAME
    spec:
      containers:
      - name: $POD_NAME
        image: $DOCKER_IMAGE
        volumeMounts:
          - mountPath: /testing-path
            name: $VOLUME_NAME
      volumes:
      - name: $VOLUME_NAME
        persistentVolumeClaim:
          claimName: $PVC_NAME
</code></pre>
