I installed minikube
and started Jenkins
inside a pod
. I am able to create a new job and execute it inside a dynamically created maven container
. However. I have a folder in my host
machine which is a Mac
based and I need that folder inside this dynamically created pod
when the job is started. How can I achieve that?
Asked
Active
Viewed 936 times
1

Damien-Amen
- 7,232
- 12
- 46
- 75
-
Did you tied `kubectl cp` command? – sfgroups Nov 29 '18 at 02:22
-
unfortunately the container that I have started does not have kubectl installed and I don't have the luxury to install that either. – Damien-Amen Nov 29 '18 at 02:34
-
I mean running kubectl from you MAC host, let me add the link. – sfgroups Nov 29 '18 at 03:01
2 Answers
2
Option 1.
https://kubernetes.io/docs/setup/minikube/#interacting-with-your-cluster
configure kubectl on your MAC, then use kubectl cp <hostdir> <podname>:<dir>
Option 2.
use the Host path option for POD, like this post

sfgroups
- 18,151
- 28
- 132
- 204
1
Maybe the easiest solution is to push that folder as git repo ( if it is not large ) to either github or your private git server , and then clone it as a first step in your jenkins job.

Ijaz Ahmad
- 11,198
- 9
- 53
- 73
-
I have done this before. It was so easy. But now I cannot push it because it has some sensitive information. :( – Damien-Amen Nov 28 '18 at 21:35