0

I'm following steps from the k8s guestbook example (https://github.com/GoogleCloudPlatform/kubernetes/tree/master/examples/guestbook) and i have issues with frontend service described in this example.

frontend-controller-182tv   10.148.3.4          ...  Running             4 minutes 
frontend-controller-i7hvs   10.148.4.3          ...  Running             4 minutes 
frontend-controller-zwk1b   10.148.1.4          ...  Running             4 minutes

and the service is:

frontend name=frontend name=frontend 10.151.244.58 8000

So it looks good, but actually i can't connect to the 8000 port of the service's IP (telnet from master):

telnet 10.151.244.58 8000
Trying 10.151.244.58...

output of the ifconfig:

cbr0      Link encap:Ethernet  HWaddr 12:1b:36:19:22:26
      inet addr:10.148.0.1  Bcast:0.0.0.0  Mask:255.255.255.0
      UP BROADCAST RUNNING MULTICAST  MTU:1460  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

docker0   Link encap:Ethernet  HWaddr 56:84:7a:fe:97:99
      inet addr:172.17.42.1  Bcast:0.0.0.0  Mask:255.255.0.0
      BROADCAST MULTICAST  MTU:1460  Metric:1
      RX packets:8 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:536 (536.0 B)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 42:01:0a:f0:f8:b7
      inet addr:10.240.248.183  Bcast:10.240.248.183  Mask:255.255.255.255
      UP BROADCAST RUNNING MULTICAST  MTU:1460  Metric:1
      RX packets:76763 errors:0 dropped:0 overruns:0 frame:0
      TX packets:48794 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:143685366 (137.0 MiB)  TX bytes:7641852 (7.2 MiB)

lo        Link encap:Local Loopback
      inet addr:127.0.0.1  Mask:255.0.0.0
      UP LOOPBACK RUNNING  MTU:65536  Metric:1
      RX packets:250900 errors:0 dropped:0 overruns:0 frame:0
      TX packets:250900 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:98458614 (93.8 MiB)  TX bytes:98458614 (93.8 MiB)

Not sure where is my mistake or what else do i need to do...

1 Answer 1

1

Actually i found an answer at https://stackoverflow.com/questions/27932594/can-my-vm-directly-access-services-in-the-google-container-engine

In my case command looks like

gcloud compute routes create frontend-service-1-1 --destination-range 10.151.244.0/24 --next-hop-instance k8s-k8s-tds-example-node-1 --next-hop-instance-zone us-central1-c

Looks like you have to create routes for all your nodes to make it work.

P.S.

Also, if you use "createExternalLoadBalancer" in your service, make sure that you allow connections from 0.0.0.0/0 to this port in cloud firewall settings.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .