Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes external ip loadbalancer bare metal

Tags:

kubernetes

is there a way to setup automatic external ip allocation to service like google do in loadbalancer ? I'm running kubernetes on bare metal.

Thank you

like image 387
Dubs Avatar asked Oct 05 '15 07:10

Dubs


1 Answers

Use services with type nodePort, it will bind your service to a fixed port on all your nodes (http://kubernetes.io/v1.0/docs/user-guide/services.html#type-nodeport)

Then you have to use a loadbalancer (i.e haproxy) to forward calls to this service.

The loadbalancer configuration can be done by a script that use kubernetes /services API.

like image 106
ant31 Avatar answered Sep 30 '22 12:09

ant31