0
[ansible@kctl-master kubectl]$ sudo kubectl get services
NAME            CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
kubernetes      10.254.0.1      <none>        443/TCP        43s
nginx-ingress   10.254.39.207   <pending>     80:32102/TCP   1m
[ansible@kctl-master kubectl]$ 

after running,

trying to have a virtual-ip not being used by this or any nodes for HA.

But "external-ip" is stuck at "pending"

[ansible@kctl-master kubectl]$ cat 0-ingress.yaml 
apiVersion: v1
kind: Service
metadata:
  name: nginx-ingress
spec:
  type: LoadBalancer
  ports:
    - port: 80
      name: http
      nodePort: 32102
  selector:
    k8s-app: nginx-ingress-lb
[ansible@kctl-master kubectl]$ 

1 Answers1

1

vSphere's cloud provider only supports volumes, not LoadBalancer services: http://vmware.github.io/docker-volume-vsphere/kubernetes/overview.html.

As such, Kubernetes is unable to provision a load balancer for said services. You should either use a NodePort service or externalIPs to expose your service to the world.

ConnorJC
  • 921
  • 1
  • 7
  • 19
  • thanks for the link. looked around i would appreciate if you can please help point to any kind of yml/json samples that describe what you say. "externalIP" you speak of, is this a shared IP among clusters? thanks –  Aug 19 '17 at 15:29
  • what if this were to be in AWS? –  Aug 19 '17 at 15:30
  • You can use the externalIPs attribute of a service to expose it without using a load balancer (But there are caveats). This example I gave for GCE should also apply to vSphere: https://serverfault.com/questions/863569/kubernetes-can-i-avoid-using-the-gce-load-balancer-to-reduce-cost/869453#869453. – ConnorJC Aug 19 '17 at 15:49
  • AWS support cloud load balancers, so it should work there. Additionally, GCE, GKE, and Openstack support cloud loadbalancers. I'd recommend considering OpenStack if you want to use on-premise VMs. – ConnorJC Aug 19 '17 at 15:51