I'm currently playing with kubernetes. I started it according to the documentation locally using the vagrant approach. Everything works fine but I can't manage to expose a service port, e.g. the web frontend of a container. In the documentation it's only described for google cloud, where google seems to be configured automatically to expose a port on it's loadbalancer. But how can I configure a port on a local installation?
Assuming you know how to redirect ports on vagrant without Kubernetes (https://docs.vagrantup.com/v2/networking/forwarded_ports.html), There are many ways to reach Services in Kubernetes:
Deploy a bare metal service loadbalancer (https://github.com/kubernetes/contrib/tree/master/service-loadbalancer) or ingress controller + create Ingress (this reaquires Kubernetes 1.1 https://github.com/kubernetes/contrib/tree/master/service-loadbalancer)
Use service.type=nodeport (https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/services.md#type-nodeport)
In the same vein, use proxy-to-service (https://github.com/kubernetes/contrib/tree/master/for-demos/proxy-to-service)
Use hostPort for your RC/Pod (against best practice: https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/config-best-practices.md)