How to Copy files from kubernetes infra node to worker node?

12/25/2019

I have three machines, which are dev machine, kubernetes infra machine and the GPU worker node machine. I operated on the dev machine, doing something like creating pods, killing pods etc.

When I try creating a pod by command

kubectl create /dlwsdata/jobfiles/191224/06e3ac7a-bff4-4986-b83e-f9f79d09e66b/06e3ac7a-bff4-4986-b83e-f9f79d09e66b.yaml

I found there is a script file missing in the worker node. This file is created temporarily while running my command. Now I wonder how to copy this script to target worker node before creating the pod?

(I don't know which worker machine the kubectl will operate beforehand. It seems that there is no message about which worker node it will create the pod, after checking the yaml file.)

-- Steve
containers
docker
kubernetes

0 Answers