<p>I am trying to deploy and access Sock-shop on Google Cloud Platform.
<a href="https://github.com/microservices-demo/microservices-demo" rel="nofollow noreferrer">https://github.com/microservices-demo/microservices-demo</a></p>

<p>I was able to deploy it using the deployment script 
<a href="https://github.com/microservices-demo/microservices-demo/blob/master/deploy/kubernetes/complete-demo.yaml" rel="nofollow noreferrer">https://github.com/microservices-demo/microservices-demo/blob/master/deploy/kubernetes/complete-demo.yaml</a></p>

<p>Based on the tutorial here 
<a href="https://www.weave.works/docs/cloud/latest/tasks/deploy/sockshop-deploy/" rel="nofollow noreferrer">https://www.weave.works/docs/cloud/latest/tasks/deploy/sockshop-deploy/</a>
It says 
Display the Sock Shop in the browser using:</p>

<p><code>&lt;master-node-IP&gt;:&lt;NodePort&gt;</code></p>

<p>But on GCP master node is hidden from the user.</p>

<p>So I changed the type from NodePort to LoadBalancer.</p>

<p>And I was able to get an external IP.</p>

<p>But it says the page cannot be found. <code>enter code here</code></p>

<p>Do I need to set up more stuff for LoadBalancer?</p>

Jae Kim
<p>I dont know If you solve the issue but I did it so I would like to share with you my solution that works for me.
You can do it through two ways:</p>

<p>1st) By creating a Load Balancer, where you expose the front-end service.
I assume that you have already created a namespace called sock-shop so any further command should specify and referred to that namespace. 
If you type and execute the command:
<code>
kubectl get services --namespace=sock-shop
</code>
you should be able to see a list with all the services included a service called "front-end". So now you want to expose that service not as NodePort but as LoadBalancer. So, execute the command:
<code>
kubectl expose service front-end --name=front-end-lb --port=80 --target-port=8079 --type=LoadBalancer --namespace=sock-shop
</code>
After this give some time and you will able to access the Front end of the Sock Shop via public IP address (ephimeral)</p>

<p>2nd) More advanced way is by configuring an Ingress Load Balancer. 
You need to configure another yaml file and put this code inside and run it as you did with the previous .yaml file. </p>

<pre><code>nano basic-ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace : sock-shop
  name: basic-ingress
spec:
  backend:
    serviceName: front-end
    servicePort: 80

kubectl apply -f basic-ingress.yaml --namespace=sock-shop
</code></pre>

<p>Locate the Public IP address through this command and after maximun 15mins you should be able to access the Sock Shop.</p>

<pre><code>kubectl get ingress --namespace=sock-shop
</code></pre>
