Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Appendix C. Applying labels and taints to Red Hat OpenShift node


In order to have our control pods run on a dedicated Red Hat OpenShift node, one must set the appropriate labels and taints to the specified node.

In this example, we will select one of our Red Hat OpenShift nodes with the role worker the label aap_node_type=control.

  1. Get the name of one of the nodes you want to label running

    $ oc get nodes
    Copy to Clipboard Toggle word wrap
  2. Choose a node from the list and note its name, e.g. worker1
  3. Apply the aap_node_type=control label to the node

    $ oc label node <node-name> aap_node_type=control
    Copy to Clipboard Toggle word wrap
    Note

    Replace <node-name> with the name of the node you want to label.

  4. Verify the creation of the label as follows:

    $ oc get nodes --show-labels | grep <node-name>
    Copy to Clipboard Toggle word wrap

    With the label created, the next step is to add a NoSchedule taint to the worker node we have already created a label for.

    The following command adds a NoSchedule taint to our node:

    oc adm taint nodes <node-name> dedicated=AutomationController:NoSchedule
    Copy to Clipboard Toggle word wrap

    dedicated: This is the key of the taint that is an arbitrary string supplied that identifies the taint.

    AutomationController: This is an arbitrary value given to the taint.

    NoSchedule: This is the effect of the taint which specifies no pods that don’t tolerate this taint will be scheduled onto this node.

    By applying this taint to our node, we are telling the Kubernetes scheduler to reserve this node for certain types of workloads that tolerate the taint. In this case, we are reserving the node for workloads with the dedicated=AutomationController toleration.

  5. Verify the taint has been applied

    $ oc get nodes \
    -o jsonpath='{range.items[*]}{@.metadata.name}{"\t"}{@.spec.taints[*].key}:{@.spec.taints[*].value}{"\n"}{end}' \
    | grep AutomationController
    Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat