3
votes

I am trying to create a "Hello Node" sample application in Google Container Engine, following this tutorial

However even after running the command kubectl expose rc hello-node --type="LoadBalancer", it is not exposing an external-IP to access the port.

vagrant@docker-host:~/node-app$ kubectl run hello-node --image=gcr.io/${PROJECT_ID}/hello-node:v1 --port=8080
replicationcontroller "hello-node" created
vagrant@docker-host:~/node-app$ kubectl expose rc hello-node --type="LoadBalancer"
service "hello-node" exposed
vagrant@docker-host:~/node-app$ kubectl get services hello-node
NAME         CLUSTER_IP       EXTERNAL_IP   PORT(S)    SELECTOR         AGE
hello-node   10.163.248.xxx                 8080/TCP   run=hello-node   14s
vagrant@docker-host:~/node-app$ kubectl get services hello-node
NAME         CLUSTER_IP       EXTERNAL_IP   PORT(S)    SELECTOR         AGE
hello-node   10.163.248.xxx                 8080/TCP   run=hello-node   23s
1

1 Answers

5
votes

After a few moments, the external IP of the load balancer is listed in the IP(s) column of the service

Usually it's 1-2 minutes. You was waiting only 23seconds. Try to wait a few moments more and it'll be OK.