Red Hat Training

A Red Hat training course is available for OpenShift Container Platform

4.7.5. patch

使用策略合并补丁更新对象的一个或多个字段:

$ oc patch <object_type> <object_name> -p <changes>

<changes> 是一个 JSON 或 YAML 表达式,其中包含新字段和值。例如,要将节点 node1spec.unschedulable 字段更新为值 true,json 表达式为:

$ oc patch node node1 -p '{"spec":{"unschedulable":true}}'