zalando-incubator / kubernetes-on-aws

Deploying Kubernetes on AWS with CloudFormation and Ubuntu
https://kubernetes-on-aws.readthedocs.io/
MIT License
625 stars 163 forks source link

Check out kube-node-drainer #133

Closed linki closed 7 years ago

linki commented 7 years ago

https://github.com/coreos/kube-aws/blob/5232aa225911641f9dd48bab571850c32718b0c5/config/templates/cloud-config-worker#L149-L176

is a systemd unit that runs on each worker and "drain[s] this k8s node to make running pods time to gracefully shut down before stopping kubelet".

looks like it moves draining from the client to the server side. therefore reducing client complexity and might also work nicely with node autoscaling and spot instances.

hjacobs commented 7 years ago

Apparently the linked "NodeDrainer" is just a simple call the kubectl drain and we already know that kubectl drain is currently broken for us (e.g. it fails when finding Job resources).

hjacobs commented 7 years ago

Related upstream issue to move "drain" to server: https://github.com/kubernetes/kubernetes/issues/25625