While one can create and manage LoadBalancer/Ingress service from the kubernetes side, there are some limitation. One of the limitation seems that the ingress object created from kubernetes is only accessible within the same namespace. With the limited availability of floating ips, this is not very good. One can manually create the LoadBalncer object from the openstack, which does not impose such limitation.


1.  LoadBalancer for SSH connection

Under "Network/Load Balancers",  click "Create Load Balancer" button.


Fig. 1 : Create a LoadBalancer - Details


We will add a TCP listener for our SSH connection. You can add other listeners later.










Let's try to ssh in to the gateway instance using the LB ip address.

We will now give it a floating ip so that it can be accessible from the external network.


Now, you should be able to ssh in to the gateway using the floating ip you just associated.

My recommendation is that, instead of  associating floating ip to individual instance, use the load balancer and assign different port to the different instances.

For HTTP connection, you can simply use L7 loadbalancing as explained below.


LoadBancer for HTTP connection

The same LB you created in the previous section can be used for HTTP load balancing (thus you don't need a new floating ip).

In the LoadBalancer meny, click the LB you created.




Go to the "listener" tab to create a listener, and click "Create Listener".




Next, we create a pool

Now, we will add a members to the pool. This is the ip and port numbers which will receive the HTTP traffic.

We assume here that we have created a "NodePort" service, whose port number is 31349.


We add all the worker nodes as a member and set the port to 31349.



For the monitor, Select the type "HTTP". You can change other values if you know what they mean. Leaving it as is won't harm.

Click "Create Listener" to create one. It will also create a pool.

It is supposed to forward your HTTP traffic to the pool you created. However, unless you have setup the health monitor properly, the forwarding won't work. The easiest way is just to delete the monitor object (somehow, from the gui, you cannot create a pool without a monitor).

Note that all the traffic, regardless of the destination Host, will be forward to the pool you created, which may not what you want.

Let's create a L7 policy, so that HTTP traffic with certain Host destination will be forwarded to the pool


Click the "listener" object you created. You will see something like below.


Click the "L7 Policies" tab. Click "Create L7 policy".



Click the policy you created and select the "L7 Rule" tab. Click "Create L7 rule".

Now, the http traffic with Host value of "k8s-10-www.gems0.org" will be forwarded to the pool of your selection. However, all the traffic is being forwarded to the pool. If you don't want this behavior, you can disable the default pool. Click "Edit Listener" and select None for the default pool.