Command

Kubernetes Patch a Resource Command

The Kubernetes command to patch a resource is kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'.

Quick Answer

Command
kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'
KubernetesCommand

Patch a Resource

Type this command
kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'

Applies a partial update to a resource in place.

Learn More

How to patch a resource in Kubernetes

  1. Open the terminal or command interface for Kubernetes.
  2. Type kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}', replace any placeholders, and run it.

Kubernetes Patch a Resource Command

Run kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'.

Related Commands

Frequently asked questions

What is the Kubernetes command to patch a resource?

Run kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}'.

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