I was successfully able to share data between a docker container and host using
docker run -it -v /path/to/host/folder:/container/path image-name
Now I am trying to run this docker image through a Kubernetes cronjob every minute for which my yaml file is as follows :
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: automation
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: automation
image: localhost:32000/image-name:registry
restartPolicy: OnFailure
But here how do I share data between my local and k8s so as to basically replicate the -v /path/to/host/folder:/container/path
functionality from the docker run command ?
What should I add to my yaml file ?
Please help.