"kubectl get services" doesn't show an "ExternalIP" column

12/16/2015

Hello Kubernetes Gurus,

I've just set up my own BareBone cluser on top of Centos7 with 1 master/2 nodes. I'm currently working through the GuestBook tutorial and when I thought everything was running smoothly, I hit a blocker... I'm unable to access the GuestBook webpage because "kubectl get services" nor "kubectl describe services/frontend" isn't giving me an "ExternalIP". In matter of fact it doesn't show me "ExternalIP" column at all.

Did I set this up incorrectly? How do I access my Guestbook externally?

Thanks in advance for your drop of knowledge.

-Ricky

Here are my configs/gets:

frontend-service.yaml:

apiVersion: v1
kind: Service
metadata:
  name: frontend
  labels:
    name: frontend
spec:
  # if your cluster supports it, uncomment the following to automatically create
  # an external load-balanced IP for the frontend service.
  type: LoadBalancer
  ports:
    # the port that this service should serve on
    - port: 80
  selector:
    name: frontend

kubectl version:
    Client Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.1464+2bfa9a1f98147c",         GitCommit:"2bfa9a1f98147cfdc2e9f4cf50e2c430518d91eb", GitTreeState:"clean"}
    Server Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.0.1464+2bfa9a1f98147c", GitCommit:"2bfa9a1f98147cfdc2e9f4cf50e2c430518d91eb", GitTreeState:"clean"}

kubectl get services

    NAME           LABELS                                    SELECTOR            IP(S)            PORT(S)    AGE
    frontend       name=frontend                             name=frontend       10.254.42.196    80/TCP     48m
    kubernetes     component=apiserver,provider=kubernetes   <none>              10.254.0.1       443/TCP    12h
    my-nginx       run=my-nginx                              run=my-nginx        10.254.169.92    80/TCP     2h
    redis-master   name=redis-master                         name=redis-master   10.254.212.151   6379/TCP   1h
    redis-slave    name=redis-slave                          name=redis-slave    10.254.251.175   6379/TCP   1h

kubectl get rc

    CONTROLLER     CONTAINER(S)   IMAGE(S)                                 SELECTOR            REPLICAS   AGE
    frontend       php-redis      gcr.io/google_samples/gb-frontend:v3     name=frontend       3          1h
    redis-master   master         redis                                    name=redis-master   1          1h
    redis-slave    worker         gcr.io/google_samples/gb-redisslave:v1   name=redis-slave    2          1h


kubectl get pods:

    NAME                 READY     STATUS    RESTARTS   AGE
    frontend-d4tns       1/1       Running   0          1h
    frontend-t9p2t       1/1       Running   0          1h
    frontend-y9k5o       1/1       Running   0          1h
    redis-master-3mflp   1/1       Running   0          1h
    redis-slave-rhgex    1/1       Running   0          1h
    redis-slave-rs4mp    1/1       Running   0          1h
-- Ricky
docker
kubernetes

1 Answer

12/16/2015

Kubernetes assigns external IPs by integrating with cloud provider APIs. If you are running a "bare metal" cluster, or any cluster which is not an integrated cloud provider, then external IPs will need to be assigned manually as described in the services documentation.

-- Tim Allclair
Source: StackOverflow