Minikube runs on something like 192.168.99.100 . Therefore, you must have access to it through NodePort on the NodePort you provide your services. For example, let's say your NodePort 30080 , then your service will be available as 192.168.99.100:30080 NodePort 30080 .
To get the ip minicube, run the minikube ip command.
September 14, 2017 Patch:
Here is a small example that works with minikube v0.16.0 .
1) Run the commands below to create nginx running on 8080 and redirect NodePort svc :
$ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080 deployment "hello-minikube" created $ kubectl expose deployment hello-minikube --type=NodePort service "hello-minikube" exposed
2) Find the nodeport used by svc:
$ kubectl get svc hello-minikube NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-minikube 10.0.0.76 <nodes> 8080:30341/TCP 4m
3) Find the ip minicub:
$ minikube ip 192.168.99.100
4) Talk to him using curl:
$ curl 192.168.99.100:30341 CLIENT VALUES: client_address=172.17.0.1 command=GET real path=/ ...
iamnat
source share