Nginx service not accessible via Load Balancer

11/23/2019

I have created a helm chart for redash and deployed on GKE.

All my services are up and running.

The service that is created as LoadBalancer points to my nginx:

▶ k get svc nginx -o yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    helm.sh/created: "1574525412"
  creationTimestamp: "2019-11-23T16:10:12Z"
  labels:
    chart: nginx-1.0.0
    component: giddy-greyhound-nginx
    heritage: Tiller
    release: giddy-greyhound
  name: nginx
  namespace: default
  resourceVersion: "584346"
  selfLink: /api/v1/namespaces/default/services/nginx
  uid: bacf3b27-0e0b-11ea-9a24-42010aa40054
spec:
  clusterIP: 10.0.3.10
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    component: giddy-greyhound-nginx
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

From within the cluster, running curl -L nginx retrieves the expected web page.

I have also the following rule in my Firewall Rules:

be

However, when hitting the cluster endpoint, say 34.99.12.123 it times out (as if it were blocked by firewall)

and when hitting the LoadBalancer's IP (say 76.33.21.123) it immediately gives me that the site cannot be reached (refused to connect).

Any suggestions about how to further debug what might be wrong with my configuration?

Shouldn't I be able to access my web page from both the GKE Cluster endpoint as also the LB's IP?

-- pkaramol
google-cloud-platform
kubernetes
nginx

1 Answer

11/23/2019

From your configuration we can clearly see that your service is of type: ClusterIP.

This means that you have an error in the configuration and you should try modifying the service type to LoadBalancer.

For a more precise debug you could generate a yaml from your chart and post-it in your post.

From what you said and the configuration you posted I can't understand how the loadbalancer was created.

-- night-gold
Source: StackOverflow