How can I debug why a Kubernetes load balancer service isn't responding on a port?

Viewed 12713

I have set up a simple Kubernetes load balancer service in front of a Node.js container, which should be exposing port 80, but I can't get a response out of it. How can I debug how the load balancer is handling requests to port 80? Are there logs I can inspect?

I have set up a load balancer service and a replication controller as described in the Kubernetes guestbook example.

The service/load balancer spec is similar to this:

{
   "kind":"Service",
   "apiVersion":"v1",
   "metadata":{
      "name":"guestbook",
      "labels":{
         "app":"guestbook"
      }
   },
   "spec":{
      "ports": [
         {
           "port":3000,
           "targetPort":"http-server"
         }
      ],
      "selector":{
         "app":"guestbook"
      },
      "type": "LoadBalancer"
   }
}

As for my hosting platform, I'm using AWS and the OS is CoreOS alpha (976.0.0). Kubectl is at version 1.1.2.

Kubernetes Info

$ ~/.local/bin/kubectl --kubeconfig=/etc/kubernetes/kube.conf get pods
NAME            READY     STATUS    RESTARTS   AGE
busybox-sleep   1/1       Running   0          18m
web-s0s5w       1/1       Running   0          12h
$ ~/.local/bin/kubectl --kubeconfig=/etc/kubernetes/kube.conf get services
NAME         CLUSTER_IP   EXTERNAL_IP   PORT(S)   SELECTOR   AGE
kubernetes   10.3.0.1     <none>        443/TCP   <none>     1d
web          10.3.0.171
2 Answers
Related