Can I transfer files between the local machine and the minicube?

I am using OS Ubuntu 16.0.4 and I installed a mini cube on it. I need to copy some files to a mini cube, so how can I do this? I tried the following command, but he asked me for a password, and I don’t know this.

scp /media/myuser/sourceFolder docker@192.168.99.100 :/home/docker/destiationFolder 

Note: the minikube IP address is 192.168.99.100 , and I used docker as the default user for minikube, but I really don’t know if this is correct. No.

So, what is the default username and password for the mini cube, and how can I copy files from my local machine to the mini cube?

Thanks:)

+5
source share
3 answers

I processed it by following these steps:

1- go to ssh minikube β†’ minikube ssh

2- Changing the docker password using sudo -> sudo passwd docker and creating a new password, so now I know the password of the docker user

3 exit ssh and return to the Ubuntu terminal -> exit

4- using the scp command to copy files to the minicube β†’ scp /local/path/to/file/ docker@minikubeIp :/your/destination/folder/

For example scp -r /media/myuser/sourceFolder docker@192.168.99.100 :/home/docker

and after that he only asked for the password of the minikube docking user, which I now know after changing it, and then I write the password and folders that were successfully copied to the mini-cube from the local machine.

+3
source

You can use the ssh-key and ip minikube :

 scp -i $(minikube ssh-key) <local-path> docker@ $(minikube ip):<remote-path> 

So the question command:

 scp -i $(minikube ssh-key) /media/myuser/sourceFolder docker@ $(minikube ip):/home/docker/destiationFolder 
+4
source
+1
source

Source: https://habr.com/ru/post/1271590/


All Articles