简体   繁体   中英

Google Container Engine: Kubernetes is not exposing external IP after creating container

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM