I am having trouble doing the same.
I have modified the file slightly to push the container image to GCR instead of Docker’s container repo.
For that I have modified the web-deploy.yml like so
- image: gcr.io/playground-s-11-cf7219e0/imagectr:latest
- containerPort: 8080
I had also pushed the image to the particular repository using the instructions here:https://cloud.google.com/container-registry/docs/pushing-and-pulling
But when I try to run it by following the same step as in the video otherwise, it does not work. Should I restart with a fresh cluster?
You don’t need to change anything in the code.
To have access to an application running on kubernetes, you will need need a load balancer.
Nigel supplied the web-lb.yml. So all that you need to do is to deploy it:
$ kubectl apply -f ./web-lb.yml
Then, check it for the public IP address:
$ kubectl get svc web-svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
web-svc LoadBalancer 10.108.0.89 184.108.40.206 80:30527/TCP 4m51s
Now you just need to copy the load balancer public IP address (220.127.116.11 in my case) and paste it on your browser.