LinuxCommandLibrary

kubectl-taint

adds or removes node taints

TLDR

Add taint to node

$ kubectl taint nodes [node-name] [key=value:NoSchedule]
copy
Remove taint
$ kubectl taint nodes [node-name] [key:NoSchedule-]
copy
Add NoExecute taint
$ kubectl taint nodes [node-name] [key=value:NoExecute]
copy
Add PreferNoSchedule
$ kubectl taint nodes [node-name] [key=value:PreferNoSchedule]
copy
Taint multiple nodes
$ kubectl taint nodes [node1] [node2] [key=value:NoSchedule]
copy

SYNOPSIS

kubectl taint [options] node key=value:effect

DESCRIPTION

kubectl taint adds or removes node taints. Taints repel pods unless they have matching tolerations.
The command controls workload placement. Effects determine scheduling behavior and eviction.

PARAMETERS

NODE

Node name.
KEY=VALUE:EFFECT
Taint specification.
NoSchedule
Prevent scheduling.
NoExecute
Evict existing pods.
PreferNoSchedule
Soft no-schedule.
-
Remove taint (suffix).
--help
Display help information.

CAVEATS

Subcommand of kubectl. Requires matching tolerations. NoExecute evicts running pods.

HISTORY

kubectl taint provides taint management for Kubernetes advanced scheduling control.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community