Google 容器引擎 (GKE):"Hello Wordpress" 教程不工作 (ERR_CONNECTION_REFUSED)
Google Container Engine (GKE): "Hello Wordpress" tutorial not working (ERR_CONNECTION_REFUSED)
我正在尝试设置来自 Running Wordpress with a Single Pod 的示例。
- 我完成了Before You Begin部分:
$ gcloud 配置列表
[compute]
zone = europe-west1-c
[core]
account = user@email.com
disable_usage_reporting = False
project = com-project-default
我已经完成了教程中的步骤:
"Step 1: Create your cluster" logs here
"Step 2: Create your pod" logs here
"Step 3: Allow external traffic" logs here
更多日志:
$kubectl 获取 pods - log (toggle text wrapping)
$gcloud 计算防火墙规则列表 - log
所以,当我尝试连接到 http://104.155.7.213/ 时,我收到了 "This web page is not available: ERR_CONNECTION_REFUSED
"。
我尝试将“Allow HTTP traffic
”显式添加到 Compute Engine VM 仪表板中的节点,并且我还尝试使用“kubectl run
”而不是弃用的“kubectl run-container
”,但是它没有帮助。有时,当 运行 “kubectl get pods
”(但这次不是)`
信息:
$ kubectl 版本
Client Version: version.Info{Major:"0", Minor:"18", GitVersion:"v0.18.1", GitCommit:"befd1385e5af5f7516f75a27a2628272bb9e9f36", GitTreeState:"clean"}
Server Version: version.Info{Major:"0", Minor:"18", GitVersion:"v0.18.2", GitCommit:"1f12b893876ad6c41396222693e37061f6e80fe1", GitTreeState:"clean"}
$ gcloud 版本
Google Cloud SDK 0.9.64
alpha 2015.06.02
bq 2.0.18
bq-nix 2.0.18
compute 2015.06.09
core 2015.06.09
core-nix 2015.06.02
dns 2015.06.02
gcloud 2015.06.09
gcutil-msg 2015.06.09
gsutil 4.13
gsutil-nix 4.12
kubectl
kubectl-linux-x86_64 0.18.1
preview 2015.06.09
sql 2015.06.09
提前感谢您的帮助!
如果想直接使用节点VM的IP地址访问容器,除了指定容器端口外,还需要指定主机端口,例如
kubectl run-container wordpress --image=tutum/wordpress --port=80 --hostport=80
或者,您可以通过 运行 kubectl proxy
在 master 上通过代理 运行 访问 wordpress,然后将您的网络浏览器指向 http://localhost:8001/api/v1beta3/proxy/namespaces/default/pods/wordpress-3gaq6
。
我正在尝试设置来自 Running Wordpress with a Single Pod 的示例。
- 我完成了Before You Begin部分:
$ gcloud 配置列表
[compute]
zone = europe-west1-c
[core]
account = user@email.com
disable_usage_reporting = False
project = com-project-default
我已经完成了教程中的步骤:
"Step 1: Create your cluster" logs here
"Step 2: Create your pod" logs here
"Step 3: Allow external traffic" logs here
更多日志:
$kubectl 获取 pods - log (toggle text wrapping)
$gcloud 计算防火墙规则列表 - log
所以,当我尝试连接到 http://104.155.7.213/ 时,我收到了 "This web page is not available: ERR_CONNECTION_REFUSED
"。
我尝试将“Allow HTTP traffic
”显式添加到 Compute Engine VM 仪表板中的节点,并且我还尝试使用“kubectl run
”而不是弃用的“kubectl run-container
”,但是它没有帮助。有时,当 运行 “kubectl get pods
”(但这次不是)`
信息:
$ kubectl 版本
Client Version: version.Info{Major:"0", Minor:"18", GitVersion:"v0.18.1", GitCommit:"befd1385e5af5f7516f75a27a2628272bb9e9f36", GitTreeState:"clean"}
Server Version: version.Info{Major:"0", Minor:"18", GitVersion:"v0.18.2", GitCommit:"1f12b893876ad6c41396222693e37061f6e80fe1", GitTreeState:"clean"}
$ gcloud 版本
Google Cloud SDK 0.9.64
alpha 2015.06.02
bq 2.0.18
bq-nix 2.0.18
compute 2015.06.09
core 2015.06.09
core-nix 2015.06.02
dns 2015.06.02
gcloud 2015.06.09
gcutil-msg 2015.06.09
gsutil 4.13
gsutil-nix 4.12
kubectl
kubectl-linux-x86_64 0.18.1
preview 2015.06.09
sql 2015.06.09
提前感谢您的帮助!
如果想直接使用节点VM的IP地址访问容器,除了指定容器端口外,还需要指定主机端口,例如
kubectl run-container wordpress --image=tutum/wordpress --port=80 --hostport=80
或者,您可以通过 运行 kubectl proxy
在 master 上通过代理 运行 访问 wordpress,然后将您的网络浏览器指向 http://localhost:8001/api/v1beta3/proxy/namespaces/default/pods/wordpress-3gaq6
。