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]$ 
  • What provider is this running on? – ConnorJC Aug 19 '17 at 3:26
  • vSphere. the container cluster will host in-house web engine – unimportantindifferentperson Aug 19 '17 at 7:01
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.

  • 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 – unimportantindifferentperson Aug 19 '17 at 15:29
  • what if this were to be in AWS? – unimportantindifferentperson 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: serverfault.com/questions/863569/…. – 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.