I can not access my Container Docker Image by HTTP
I created an image with apache2 running locally on a docker container via Dockerfile exposing port 80. Then pushed to my DockerHUB repository
I created a new instance of Container Engine In my project on the Google Cloud. Within this I have two clusters, the Master and the Node1.
Then created a Pod specifying the name of my image in DockerHUB and configuring Ports “containerPort” and “hostPort” for 6379 and 80 respectively.
Node1 accessed via SSH and the command line:
$ sudo docker ps -l Then I found that my docker container there is.
I created a service for instance by configuring the ports as in the Pod, “containerPort” and “hostPort” for 6379 and 80 respectively.
I checked the Firewall is available with access to port 80. Even without deems it necessary, I created a rule to allow access through port 6379.
But when I enter
http://IP_ADDRESS:PORT is not available.
Any idea about what it’s wrong?
One Solution collect form web for “I can not access my Container Docker Image by HTTP”
If you are using a service to access your pod, you should configure the service to use an external load balancer (similarly to what is done in the guestbook example’s frontend service definition) and you should not need to specify a host port in your pod definition.
Once you have an external load balancer created, then you should open a firewall rule to allow external access to the load balancer which will allow packets to reach the service (and pods backing it) running in your cluster.