Google Container Engine (GKE): "Hello Wordpress" tutorial not working (ERR_CONNECTION_REFUSED)

688 views Asked by At

I'm trying to setup example from Running Wordpress with a Single Pod.

$ gcloud config list

[compute]
zone = europe-west1-c
[core]
account = [email protected]
disable_usage_reporting = False
project = com-project-default

So, when I try to connect to http://104.155.7.213/ I'm receiving "This web page is not available: ERR_CONNECTION_REFUSED".

I tried to add "Allow HTTP traffic" explicitly to the node in Compute Engine VMs dashboard and also I tried to use "kubectl run" instead of deprecated "kubectl run-container", but it doesn't help. Also sometimes I'm receiving "last termination: exit code 2" (1 or 2) in "message" column when run "kubectl get pods" (but not this time)`

Info:

GKE from June 10, 2015

$ kubectl version

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 version

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

Thank you for your help in advance!

1

There are 1 answers

0
Robert Bailey On BEST ANSWER

If you want to access the container directly using the node VM's IP address, you need to specify a host port in addition to a container port, e.g. kubectl run-container wordpress --image=tutum/wordpress --port=80 --hostport=80

Alternatively, you can access wordpress via the proxy running on the master by running kubectl proxy and then pointing your web browser at http://localhost:8001/api/v1beta3/proxy/namespaces/default/pods/wordpress-3gaq6.