Accessing Kubernetes Guestbook Go Example

10/30/2015

I've downloaded the latest (as of October 29th, 2015) tarball, run ./cluster/kube-up.sh and followed the guestbook-go example.

I'm hoping to access the underlying frontend on my OSX host. As a newb to this, I'm having trouble discerning the layers of networking involved between my my host, virtualbox, kubernetes + docker.

The example spawns 3 docker frontends so I'm anticipating I have some load-balanced way of accessing it.

➜  kubernetes  kubectl get services                                                                                                                               0
NAME           LABELS                                    SELECTOR            IP(S)            PORT(S)
guestbook      app=guestbook                             app=guestbook       10.247.25.102    3000/TCP
kubernetes     component=apiserver,provider=kubernetes   <none>              10.247.0.1       443/TCP
redis-master   name=redis-master                         name=redis-master   10.247.212.56    6379/TCP
redis-slave    name=redis-slave                          name=redis-slave    10.247.224.236   6379/TCP

I'm expecting to be able to visit 10.247.25.102:3000 to see the running application. No luck.

https://10.245.1.2 Does yield some kind of HTTP response. This corresponds to the eth1 interface of the master vm.

➜  kubernetes  kubectl cluster-info                                                                                                                           
Kubernetes master is running at https://10.245.1.2
KubeDNS is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-dns
KubeUI is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-ui



vagrant ssh minion-1
ifconfig
...
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.245.1.3  netmask 255.255.255.0  broadcast 10.245.1.255
        inet6 fe80::a00:27ff:fe9a:e16  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:9a:0e:16  txqueuelen 1000  (Ethernet)
        RX packets 8858  bytes 5128595 (4.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10119  bytes 2535751 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
...

Using Virtualbox 5.0.8, Vagrant 1.7.4,

-- Koobz
kubernetes
vagrant

2 Answers

10/30/2015

Updating to Kubernetes 1.0.7 solved the issue. They switched to Flannel for managing to overlay network.

-- Koobz
Source: StackOverflow

10/30/2015

Have you looked at this debugging section? In general, pods are not expected to be accessed directly. A service is expected to be created that will proxy requests to pod(s).

Examples include: KubeUI is running at https://10.245.1.2/api/v1/proxy/namespaces/kube-system/services/kube-ui

-- Vishnu Kannan
Source: StackOverflow