@cathrine_goyette
To copy a file to a Minikube pod, you can use the kubectl cp
command. Here's how you can do it:
Note: If you want to copy a file from a pod to your local machine, you can swap the source and destination arguments in the kubectl cp
command.
@cathrine_goyette
Here's an example to copy a file named file.txt to a pod named my-pod in the /path/inside/pod directory:
1
|
kubectl cp file.txt my-pod:/path/inside/pod |
Replace my-pod
with the name of your pod and provide the correct path inside the pod where you want to copy the file.
If you want to copy a file from a pod to your local machine, you can reverse the source and destination like this:
1
|
kubectl cp my-pod:/path/inside/pod/file.txt file.txt |
This command will download the file.txt from the specified path inside the pod to your current directory in the local machine.