Command

Kubernetes Taint a Node Command

The Kubernetes command to taint a node is kubectl taint nodes foo dedicated=special-user:NoSchedule.

Quick Answer

Command
kubectl taint nodes foo dedicated=special-user:NoSchedule
KubernetesCommand

Taint a Node

Type this command
kubectl taint nodes foo dedicated=special-user:NoSchedule

Adds a taint to a node so only matching pods are scheduled there.

Learn More

How to taint a node in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl taint nodes foo dedicated=special-user:NoSchedule, replace any placeholders, and run it.

Kubernetes Taint a Node Command

Run kubectl taint nodes foo dedicated=special-user:NoSchedule.

Related Commands

Frequently asked questions

What is the Kubernetes command to taint a node?

Run kubectl taint nodes foo dedicated=special-user:NoSchedule.

Where do I type this Kubernetes command?

Type it in the terminal or command-line interface used by Kubernetes.

Does this Kubernetes command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify