Now I wanna run a machine learning pod in openshift, but I need to upload some data like training set to the pod, and better to the PV when considering persistence. Is there some apis helpful on this?
Asked
Active
Viewed 295 times
0
-
Have you tried using ``oc rsync`` to copy it to a volume mounted in the running pod? – Graham Dumpleton Mar 30 '18 at 03:19
-
This works when using oc and connecting to the openshift cluster. But what should we do without oc and want to upload files remotely – 白栋天 Mar 30 '18 at 05:32
-
1You can run ``oc rsync`` with the ``--loglevel 9`` option and it will show what REST API endpoints it is using underneath. They may help you work out what you need to do if for some reason you don't want to just use ``oc``. – Graham Dumpleton Mar 30 '18 at 06:08
1 Answers
0
Attach PV to pod. Then you you can use kubectl cp.
For example
kubectl cp /tmp/foo_dir <some-pod>:/your_pv/bar_dir
/your_pv
should be specified in Pods spec.volumeMounts to use your PVC.

Maciek Sawicki
- 6,717
- 9
- 34
- 48