Get an external IP for a Kubernetes LoadBalancer on Openstack

4/4/2018

I'm just new with Kubernetes, I'm using OpenStack and I would like to create a load balancer to access my NodeJs server running on 3 pods. I get a pending loop when my load balancer try to get its public ip. I'm using kubeadm with calico.

Screen: Pending External IP

-- Yummel
kubernetes
openstack

1 Answer

4/5/2018

This is a workaround method. You can mention the external IP:

apiVersion: v1
kind: Service
metadata:
  name: node-js
  labels:
    name: node-js
spec:
  type: LoadBalancer
  externalIPs:
  - 10.240.0.4
  ports:
  - port: 80
    targetPort: 80
    nodePort: 30000
  selector:
    name: node-js
-- Yummel
Source: StackOverflow