News for hackers. Stuff that matters.
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by webo on Wednesday February 15, 2017 @11:12PM (#13657705)
We've been running Kubernetes in production for over a year. It has a steep learning curve and it takes a lot of time to fine-tune the underlying infrastructure (we use CoreOs) to make it production-ready. There still seems to be a lot of shortcomings of k8s that seem like should have been addressed by now:

- it is impossible to trigger a rescheduling / rebalancing. When a new node comes in (via AutoScaling policy or whatever), kubernetes doesn't do anything. Thus, the new nodes can be sitting there doing nothing.

- once a pod has been scheduled onto a node, it never reschedules it anywhere else. The node may be experiencing problems, thus the pod is affected. k8s doesn't do anything to heal that -- it could simply delete the pod so it is rescheduled somewhere else.

- docker itself constantly ships with a lot of bugs. To this day (we are on docker 1.12.6), we constantly have problems with the docker daemon hanging or becoming unresponsive. I'm not sure if k8s can do much about this, but I feel like it should since we don't directly control docker.

- doesn't integrate more tightly with the OS / cloud provider. For example, it could perform health checks and decide if the node should be restarted, terminated, or idle.

All of our services are stateless, so it would be nice to have the option for all the above, especially k8s started as being the solution for stateless apps.

Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by Artemis2 on Thursday February 16, 2017 @03:46AM (#13658513)
This is right on point with our experience. Kubernetes is great tech but it could be smarter with respect to scheduling decisions.

Docker is always packed full of bugs; we had to increase redundancy everywhere in our stack. It's consistently been the source for me getting paged at night, and now it's the first thing I look at when there is a new issue. Some components I feel could fail more easily: our etcd and Consul clusters have been chugging along fore more than a year, even though they solve a problem much more complex than Docker does. Docker has been "production-ready" for years now, but I would not recommend it. The developers always fix that critical, production-affecting bug in the next release, but it's been disappointing for some time. I look forward to rkt + Kubernetes getting more mature.

> - once a pod has been scheduled onto a node, it never reschedules it anywhere else. The node may be experiencing problems, thus the pod is affected. k8s doesn't do anything to heal that -- it could simply delete the pod so it is rescheduled somewhere else.

IIRC, if a node goes from NodeReady to NodeNotReady, pods are drained from it.

Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by cddotdotslash on Thursday February 16, 2017 @12:16AM (#13657906)
We've been using Docker as well and I can attest to the shear number of bugs and constant regressions. I don't think a release has gone by without a bug that prevents us from updating. From slow pulls, to slow extractions, to issues with SELinux, to namespace incompatibilities, to the daemon just hanging repeatedly. It's frustrating because the technologies around Docker (Mesos, Kubernetes, Marathon, etc) seem to be getting better and more stable while Docker just continues to have issues.
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by webo on Thursday February 16, 2017 @12:50AM (#13657995)
Also, in our case it doesn't help when CoreOs auto-upgrades docker versions :(

I'm really looking forward to rkt so that we can finally have a solid alternative to docker.

Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by alxvio on Thursday February 16, 2017 @12:26PM (#13661766)
> - docker itself constantly ships with a lot of bugs. To this day (we are on docker 1.12.6), we constantly have problems with the docker daemon hanging or becoming unresponsive. I'm not sure if k8s can do much about this, but I feel like it should since we don't directly control docker.

To be fair, sometimes these problems are due to the kernel. Specifically, the infamous unregister_netdevice ref count issue (https://github.com/docker/docker/issues/5618) has been around for years. One of the comments from a kubernetes dev says they're bypassing the cause and don't see it in GKE production.

Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by alpb on Thursday February 16, 2017 @12:07AM (#13657876)
> - once a pod has been scheduled onto a node, it never reschedules it anywhere else. The node may be experiencing problems, thus the pod is affected. k8s doesn't do anything to heal that -- it could simply delete the pod so it is rescheduled somewhere else.

Can you please elaborate this? When you are using replication controllers or deployments, don’t they drive the state to the desired/goal state, which is N replicas of a pod? So when the node is shut down, I guess it should be rescheduling those dead pods somewhere else to satisfy the goal state?

Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by webo on Thursday February 16, 2017 @12:48AM (#13657986)
You may have misunderstood me. The case I'm talking is, the node reports Ready, but the pod itself is not functioning properly.

One common issue we have is the pod gets stuck in a restart loop (for whatever reason, including starvation of resources). k8s just keeps restarting it for days on that node, instead of simply rescheduling it after X restarts or some other condition.

https://github.com/kubernetes/kubernetes/issues/13385

Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by shaklee3 on Thursday February 16, 2017 @01:00AM (#13658038)
Isn't that what custom liveliness probes are for?
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by webo on Thursday February 16, 2017 @01:12AM (#13658077)
No- liveness probe just restarts the pod if the check fails, doesn't kill it.
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by amouat on Thursday February 16, 2017 @05:34AM (#13658899)
I think a failed liveness will restart the container, not the whole pod.
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by webo on Thursday February 16, 2017 @10:49AM (#13660824)
You're right. We always have one container per pod so I didn't fully think about this.
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by shaklee3 on Saturday February 18, 2017 @11:42AM (#13675393)
Isn't that because the pod's restart policy is set to restart? What if you set that to off? Does it fail the whole pod?
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by jaxxstorm on Thursday February 16, 2017 @03:56AM (#13658545)
Isn't this basically eviction? https://github.com/kubernetes/community/blob/master/contribu...

Are you saying this doesn't work?

Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by webo on Thursday February 16, 2017 @04:23AM (#13658642)
Eviction works fine when k8s detects there's a problem. I was referring to cases like this one: https://github.com/kubernetes/kubernetes/issues/13385
Re:The Basics: Kubernetes, Mesosphere, and Docker Swarm by jfindley on Thursday February 16, 2017 @08:26AM (#13659688)
When I was solving this problem about a year ago for a previous company, I got around this by having a simple health checker that killed any node not properly responding to dns/docker/etc queries, and automatically replacing it with a new node.

Granted we were using mesos not k8s, but I suspect a similar approach could work here too.