DOKS icon indicating copy to clipboard operation
DOKS copied to clipboard

Feature Request: UI Integration to Apply Taints automatically to Node Pools

Open joeldeteves opened this issue 4 years ago • 5 comments

It would be nice if there were an option in the DO Control Panel to automatically apply a taint to any nodes that belong to a specific node pool - it could be added under the Node Pool settings:

image

This would help us better manage our clients some of whom need to stay on specific nodes.

Currently I am handling it by manually re-applying the taints if I need to recycle the nodes.

I suppose I could script it and execute a job periodically, but it would be nice if it was done at the DO level.

Thanks for your consideration,

joeldeteves avatar Jan 03 '22 23:01 joeldeteves

Hi @joeldeteves 👋

While we don't have UI / control panel integration yet, it is possible to specify so-called persistent node pool taints through the API that have the very behavior you are describing. See also the taints field on the DOKS API reference.

Does that help you, or were you asking for UI integration in particular?

timoreimann avatar Jan 03 '22 23:01 timoreimann

Related: #3

timoreimann avatar Jan 03 '22 23:01 timoreimann

Hi @joeldeteves 👋

While we don't have UI / control panel integration yet, it is possible to specify so-called persistent node pool taints through the API that have the very behavior you are describing. See also the taints field on the DOKS API reference.

Does that help you, or were you asking for UI integration in particular?

UI integration would definitely make things easier.

But regarding the option you showed me, is it possible to apply a persistent node pool taint to an existing node pool?

~~Currently I only see it under the add section of that document.~~

Nevermind, I see it under the update section as well!

Thank you,

joeldeteves avatar Jan 03 '22 23:01 joeldeteves

Great! I'm happy to keep the issue open to publicly track UI integration.

timoreimann avatar Jan 03 '22 23:01 timoreimann

Here's how I did it in case anyone else is searching for a quick solution:

  1. export $DIGITALOCEAN_TOKEN=my-access-token
  2. doctl -t $DIGITALOCEAN_TOKEN kubernetes cluster node-pool update mycluster mynodepool --taint "key=false:NoExecute"

Using doctl is a bit easier than using cURL or other methods to access the API.

Docs on how to use doctl here: https://docs.digitalocean.com/reference/doctl/reference/kubernetes/cluster/node-pool/update/

Thanks again @timoreimann

joeldeteves avatar Jan 04 '22 00:01 joeldeteves