GCE LoadBalancer networking breaks when a Kubernetes pod is restarted

66 Views Asked by At

Using Google Container Engine (hosted k8s) with following version info:

Server Version: version.Info{
  Major:"1", Minor:"4", 
  GitVersion:"v1.4.7", 
  GitCommit:"92b4f971662de9d8770f8dcd2ee01ec226a6f6c0", 
  GitTreeState:"clean", 
  BuildDate:"2016-12-10T04:43:42Z", 
  GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"
}

I've encountered a serious issue and not sure if I set up configuration properly or if this a Kubernetes bug. We have a replication controller that is responsible for our external REST API. The pods are exposed via a k8s service, specifically an external LoadBalancer. When k8s restarts the container, the service fails to redirect traffic to the restarted container. If all pods for an r.c. fail, the API is no longer externally accessible.

I'd expect the service should automatically redirect traffic to a restarted pod and the process should be seamless. I can confirm the pod restarts without hassle and the application pod is alive and well. However, the service completely fails to direct traffic, and instead returns a 502 error.

Here's the configuration for the service: enter image description here enter image description here

Should something be different in the service config to force the LoadBalancer to register a restarted container as active?

0

There are 0 best solutions below