<p>I am learning GKE services and have created a <code>GKE cluster</code> with below information</p>

<pre><code> $ gcloud container clusters list
   NAME       LOCATION    MASTER_VERSION  MASTER_IP       MACHINE_TYPE   NODE_VERSION    NUM_NODES  STATUS
   mycluster  us-east1-b  1.14.10-gke.27  35.X.X.X        n1-standard-1  1.14.10-gke.27  3          RUNNING
</code></pre>

<p>I created my own <code>VPC subnet</code> with below range which I assigned to the cluster .</p>

<pre><code>   IP address range : 10.7.0.0/24
</code></pre>

<p>The below secondary IP range was assigned by GKE engine</p>

<pre><code>   Secondary IP range

  gke-mycluster-pods-765b8f97       10.44.0.0/14    
  gke-mycluster-services-765b8f97   10.237.0.0/20 
</code></pre>

<p>After creating the cluster the node information is as follows:</p>

<pre><code>  $kubectl get nodes          

  NAME                                       STATUS   ROLES    AGE   VERSION
  gke-mycluster-default-pool-c2ddd83e-km5k   Ready    &lt;none&gt;   21m   v1.14.10-gke.27
  gke-mycluster-default-pool-c2ddd83e-trrl   Ready    &lt;none&gt;   21m   v1.14.10-gke.27
  gke-mycluster-default-pool-c2ddd83e-x4w3   Ready    &lt;none&gt;   21m   v1.14.10-gke.27
</code></pre>

<p>My deployment YAML is as follows which creates a nginx container:</p>

<pre><code>  apiVersion: apps/v1
  kind: Deployment
  metadata:
     name: mywebapp-replicaset
     labels:
       app: mywebapp
       type: front-end
     spec:
       template:
         metadata:
         name: myngix-pod
           labels:
             app: mywebapp
             type: front-end
  spec:
    containers:
      - name: nginx
        image: nginx
        ports:
          - containerPort: 80
    replicas: 3
    selector:
    matchLabels:
       type: front-end
</code></pre>

<p>Below is my service definition</p>

<pre><code>  apiVersion: v1
  kind: Service
  metadata:
     name: mywebapp-services
     labels:
       app: mywebapp
       type: front-end
  spec:
     type: LoadBalancer
     ports:
       - targetPort: 80
         port: 80
     selector:
       app: mywebapp
       type: front-end 
</code></pre>

<p>After creating the service using kubectl command , it looks like this </p>

<pre><code>  $ kubectl get services
   NAME                TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
   kubernetes          ClusterIP      10.237.0.1      &lt;none&gt;        443/TCP        23h
   mywebapp-services   LoadBalancer   10.237.12.141   &lt;pending&gt;     80:31102/TCP   6s
</code></pre>

<p>Now if I try to access the <code>LoadBalancer IP</code> from <code>Gcloud shell</code> it is timing out , am I missing something </p>

<pre><code> $ curl http://10.237.12.141:80
 curl: (7) Failed to connect to 10.237.12.141 port 80: Connection timed out
</code></pre>

Zama Ques
<p>The address 10.x.x.x is a private IPv4 address in your VPC. Cloud Shell is not running in your VPC. Therefore the address is not reachable. You must use the External IP.</p>

<p>For more information about private IPv4 addresses:</p>

<p><a href="https://en.wikipedia.org/wiki/Private_network#Private_IPv4_addresses" rel="nofollow noreferrer">Private IPv4 addresses</a></p>

<p>There are also private IPv6 addresses. Google Cloud VPCs do not support IPv6. Some Google Cloud services such as HTTP(S) Load Balancers do support IPv6 but these resources are not part of your project's VPCs.</p>

<blockquote>
  <p>VPC networks only support IPv4 unicast traffic. They do not support
  broadcast, multicast, or IPv6 traffic within the network; VMs in the
  VPC network can only send to IPv4 destinations and only receive
  traffic from IPv4 sources. However, it is possible to create an IPv6
  address for a global load balancer.</p>
</blockquote>

<p><a href="https://cloud.google.com/vpc/docs/vpc#specifications" rel="nofollow noreferrer">VPC network overview - Specifications</a></p>
