How to remove node-taint via apiclient? #4768
-
|
Hi, I have the following use case:
the trouble is with the step 3, I can't find how to remove it from the config. Here are some examples of what I've tried: apiclient set --json '{"kubernetes": {"node-taints": {"pullsecrets-not-ready": []}}}'
Failed to change settings: Failed PATCH request to '/settings?tx=apiclient-set-aFXHfCsm713hVmCu': Status 400 when PATCHing /settings?tx=apiclient-set-aFXHfCsm713hVmCu: Json deserialize error: empty taint value at line 1 column 57
apiclient set --json '{"kubernetes": {"node-taints": {}}}'
Failed to change settings: Failed POST request to '/tx/commit_and_apply?tx=apiclient-set-AB7MA1Cd92vVA8JA': Status 422 when POSTing /tx/commit_and_apply?tx=apiclient-set-AB7MA1Cd92vVA8JA: Tried to commit with no pending changesThanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, Thanks reaching out, Taints live on the Node object in the Kubernetes API server, so they can only be removed through the Kubernetes API itself. Kubelet's AlternativesFor your use case (bootstrap container fetches pull secret → remove taint on success), there are a few approaches you can try:
Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hi, Thanks reaching out,
Taints live on the Node object in the Kubernetes API server, so they can only be removed through the Kubernetes API itself.
Kubelet's
--register-with-taintsflag is only applied at initial node registration. On subsequent kubelet restarts, taints are not reconciled. Removing the taint from Bottlerocket's settings and restarting kubelet would have no effect on the actual node.Alternatives
For your use case (bootstrap container fetches pull secret → remove taint on success), there are a few approaches you can try:
DaemonSet with a toleration: Deploy a DaemonSet that tolerates
pullsecrets-not-ready, checks that the pull secret is available, and then removes the ta…