0
votes

I am using Kubernetes on Google Container Engine and am able to establish a service with an exposed LoadBalancer port. I can "curl" the exposed IP / port and get a successful response from outside the cluster from any location (say, from my desktop connected to internet).

My problem is that I get a timeout when I "curl" from within my gcloud shell.

The following is my configuration which may help in diagnosing the problem.

$ kubectl get services

NAME            CLUSTER-IP     EXTERNAL-IP       PORT(S)          AGE
some-service    10.3.255.17    104.198.60.137    6884:32318/TCP   5h

Below is my "curl" command:

curl 104.198.60.137:6884/testing

Here are my firewall rules:

NETWORK  SRC_RANGES         RULES                          SRC_TAGS  TARGET_TAGS
default-allow-icmp                       default  0.0.0.0/0          icmp
default-allow-internal                   default  10.128.0.0/9       tcp:0-65535,udp:0-65535,icmp
default-allow-rdp                        default  0.0.0.0/0          tcp:3389
default-allow-ssh                        default  0.0.0.0/0          tcp:22
gke-cluster-1-d18be73f-all               default  10.0.0.0/14        tcp,udp,icmp,esp,ah,sctp
gke-cluster-1-d18be73f-ssh               default  35.188.121.142/32  tcp:22                                   gke-cluster-1-d18be73f-node
gke-cluster-1-d18be73f-vms               default  10.128.0.0/9       tcp:1-65535,udp:1-65535,icmp             gke-cluster-1-d18be73f-node
k8s-fw-a313ec7ec45fb11e794e942010a8001a  default  0.0.0.0/0          tcp:6881                                 gke-cluster-1-d18be73f-node
k8s-fw-a3305409545fb11e794e942010a8001a  default  0.0.0.0/0          tcp:6882                                 gke-cluster-1-d18be73f-node
k8s-fw-a342a4afb45fb11e794e942010a8001a  default  0.0.0.0/0          tcp:6883                                 gke-cluster-1-d18be73f-node
k8s-fw-a3547a17b45fb11e794e942010a8001a  default  0.0.0.0/0          tcp:6884                                 gke-cluster-1-d18be73f-node
k8s-fw-a36214ad945fb11e794e942010a8001a  default  0.0.0.0/0          tcp:6885                                 gke-cluster-1-d18be73f-node
k8s-fw-a3736208545fb11e794e942010a8001a  default  0.0.0.0/0          tcp:6886                                 gke-cluster-1-d18be73f-node
k8s-fw-l7--2b2b408525a44e47              default  130.211.0.0/22     tcp:31949,tcp:32190,tcp:31936            gke-cluster-1-1e73cc9b-node
k8s-fw-l7--858a1dc8bb79c2ef              default  130.211.0.0/22     tcp:30169,tcp:30621                      gke-cluster-1-5494a47a-node
1
Could you increase the verbosity of the curl command using -vv flag? Where is this gcloud shell located?Javier Salmeron

1 Answers

0
votes

If you are inside the cluster maybe then it would make sense using the Cluster IP. Could you check if it works like that?