2017-05-03 21:53:51 +00:00
|
|
|
## Networking
|
|
|
|
|
|
|
|
The minikube VM is exposed to the host system via a host-only IP address, that can be obtained with the `minikube ip` command.
|
|
|
|
Any services of type `NodePort` can be accessed over that IP address, on the NodePort.
|
|
|
|
|
2018-02-27 17:54:00 +00:00
|
|
|
To determine the NodePort for your service, you can use a `kubectl` command like this (note that `nodePort` begins with lowercase `n` in JSON output):
|
2017-05-03 21:53:51 +00:00
|
|
|
|
2018-02-27 17:54:00 +00:00
|
|
|
`kubectl get service $SERVICE --output='jsonpath="{.spec.ports[0].nodePort}"'`
|
2017-12-12 14:48:04 +00:00
|
|
|
|
|
|
|
We also have a shortcut for fetching the minikube IP and a service's `NodePort`:
|
|
|
|
|
|
|
|
`minikube service --url $SERVICE`
|