Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
nginx' buffering on kubeapi-loadbalancer is breaking kubectl #172
I'm adding a Juju action to create and delete a docker registry, much like the currently existing "microbot" action. The creation works fine, but the deletion always fails, specifically the deletion of the replicationcontroller.
I found the root cause to be the bufferring of nginx in the kubeapi-loadbalancer unit. More specifically, when the "kubectl delete" action is run against a replicationcontroller, kubectl tries to monitor the "downscaling" of said replicationcontroller using a URL in the form of :
This "/watch/" URLs streams data, but because nginx buffers said data (presumably until the connection is closed from the client, which it never is because the client doesn't receive data !), it never reaches the kubectl client. The connection is then closed by nginx, because of the "proxy_read_timeout 90;" config option.
This is fixed by adding the following to the nginx configuration :
However, I am no nginx expert, so I'm not sure if there are other consequences to turning off this buffering.