Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to transfer files between local machine and minikube?

I am using OS Ubuntu 16.0.4 and i installed minikube on it. I need to copy some files to minikube, so how can i do that? I tried next command but it asked me on password and i don't know it

scp /media/myuser/sourceFolder [email protected]:/home/docker/destiationFolder 

Note: minikube IP is 192.168.99.100, and i used docker as default user for minikube but actually i don't know if it correct ot not.

So what is the default username and password for minikube and how can i copy files from my local machine into minikube?

Thanks :)

like image 594
mibrahim.iti Avatar asked Sep 07 '17 00:09

mibrahim.iti


People also ask

How do I SSH into minikube?

If you want to ssh into your Minikube node/VM, then use SSH keys. You can use a Windows client application like WinSCP to configure the keys for your VM. If the format of keys is not as expected (. ppk), then use another client called PuttyGen to convert the keys into the expected format.


1 Answers

On the host machine you can use the ssh-key and ip subcommands of the minikube command:

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

So the command from the question becomes:

scp -i $(minikube ssh-key) /media/myuser/sourceFolder docker@$(minikube ip):/home/docker/destiationFolder 
like image 95
Dirk Avatar answered Sep 29 '22 11:09

Dirk