I have a docker image which I want to run in kubernetes. A cluster already exists and I can kubectl it.
The docker image will be static, but it needs a data file. In my docker-compose running locally it would be given as
services:
mysvc:
image: my-image
volumes:
- /home/me/data.dat:/data.dat
I want to upload /home/me/data.dat to the kubernetes cluster/pod, where it will be mounted to /data.dat in the container.
Later, while the application is running, I want to re-upload this file, so it will be replaced in the running container.
If the container restarts for any reason, I want the most-recently uploaded version of data.dat to be mounted.
What's the simplest way to do this?