Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
fix kube-node-drainer not to fail when draining a node running Daemon…
Browse files Browse the repository at this point in the history
…Set-managed pods

Before this change, you could reproduce the failure running `sudo sytemctl stop kube-node-drainer` which showed a error message indicating this issue like:

```
May 09 05:04:08 ip-10-0-0-234.ap-northeast-1.compute.internal sh[15376]: error: DaemonSet-managed pods: cassandra-e3tdb (use --ignore-daemonsets to ignore)
May 09 05:04:08 ip-10-0-0-234.ap-northeast-1.compute.internal systemd[1]: kube-node-drainer.service: Control process exited, code=exited status=1
```

After this change, you can drain a node even if it was running DaemonSet-managed pods:

```
May 09 10:41:08 ip-10-0-0-202.ap-northeast-1.compute.internal sh[7671]: node "ip-10-0-0-202.ap-northeast-1.compute.internal" cordoned
May 09 10:41:08 ip-10-0-0-202.ap-northeast-1.compute.internal sh[7671]: WARNING: Skipping DaemonSet-managed pods: cassandra-jzfqo
May 09 10:41:08 ip-10-0-0-202.ap-northeast-1.compute.internal sh[7671]: node "ip-10-0-0-202.ap-northeast-1.compute.internal" drained
```
  • Loading branch information
cw-kuoka authored and mumoshu committed Aug 11, 2016
1 parent 24c650b commit d2a9085
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions multi-node/aws/pkg/config/templates/cloud-config-worker
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ coreos:
--server=https://{{.ControllerIP}}:443 \
--kubeconfig=/etc/kubernetes/worker-kubeconfig.yaml \
drain $$(hostname) \
--ignore-daemonsets \
--force'

[Install]
Expand Down

0 comments on commit d2a9085

Please sign in to comment.