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 this:
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
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.