Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minikube networking

I have a Linux build machine that I have installed minikube too. Within the minikube instance I have installed artifactory which I will be using for storing various build artifacts

I now want to be able to do some work on my dev machine (which is an unrelated laptop on the same network as the Linux build machine) and push some built artifacts into artifactory.

However I can't figure out how to get to artifactory. When I ssh to the Linux server and check the minikube service I can see that the artifactory instance is running on a 192.168 address.

Is there any way to expose artifactory ie access it on the windows machine? Or is this not possible and I should just install artifactory on the Linux machine rather than in minikube?

like image 576
Sykomaniac Avatar asked Jan 28 '23 17:01

Sykomaniac


1 Answers

Expose you artifactory Service

$ minikube service <artifactory-service> -n <namespace>

Or get the URL

$ minikube service <artifactory-service> -n <namespace> --url

If you want to access from remote, you need to do something else.

Suppose, when you run minikube service <artifactory-service> -n <namespace> --url, you get following

http://192.168.99.100:30654

You can access artifactory in minikube using this URL. But can't access from remote.

Now do this, expose port 30654

ssh -i ~/.minikube/machines/minikube/id_rsa docker@$(minikube ip) -L \*:30654:0.0.0.0:30654

You will be able to access from other network.

like image 163
Shahriar Avatar answered Jan 31 '23 07:01

Shahriar