gpt4 book ai didi

docker - 谷歌容器引擎: Kubernetes is not exposing external IP after creating container

转载 作者:行者123 更新时间:2023-12-02 02:20:38 25 4
gpt4 key购买 nike

我正在尝试按照此 tutorial 在 Google 容器引擎中创建一个“Hello Node”示例应用程序

但是,即使在运行命令 kubectl公开 rc hello-node --type="LoadBalancer" 后,它也没有公开外部IP来访问端口。

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

通常是 1-2 分钟。你只等了 23 秒。尝试再等一会儿就可以了。

关于docker - 谷歌容器引擎: Kubernetes is not exposing external IP after creating container,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35021181/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com