<commit_before>//Module included in the following assemblies:
//
// * sandboxed_containers/deploying_sandboxed_containers.adoc

[id="sandboxed-containers-selecting-nodes_{context}"]
= Selecting nodes for {sandboxed-containers-first}

You can selectively install the Kata runtime on specific workers.

.Prerequisites

* You have {product-title} {product-version} installed on your cluster.
* You have installed the OpenShift CLI (oc).
* You have access to the cluster as a user with the `cluster-admin` role.

.Procedure

. Identify the labels that you want to use for selecting your nodes. For this example, use labels to selects to be chosen as candidates to run on your {sandboxed-containers-first} workloads. If the nodes exist, they are selected.
.. To apply a label to a node, run the following command:
+
[source,terminal]
----
$ oc label node <worker_node_name> <label>=<value>
----
+
This labels your worker node with the `<label>` label that has a value of `<value>`.

. To add a label selector, edit the `KataConfig` custom resource (CR):
+
[source,terminal]
----
$ oc edit kataconfig
----
.Example
+
[source,yaml]
----
  apiVersion: kataconfiguration.openshift.io/v1
  kind: KataConfig
  metadata:
    name: cluster-kataconfig
  spec:
    kataConfigPoolSelector:
      matchLabels:
         custom-kata-machine-pool: true
----

.Verification

* You can check to see if the nodes in the `machine-config-pool` object are going through a config update.
** If you are using the default nodes, you can monitor the `machine-config-pool` resource by running:
+
[source,terminal]
----
$ watch oc get mcp worker
----
** If you are using selected nodes, you can monitor the `machine-config-pool` resource by running:
+
[source,terminal]
----
$ watch oc get mcp kata-oc
----
<commit_msg>BZ: 2023822 - Updated typo in yaml file<commit_after>//Module included in the following assemblies:
//
// * sandboxed_containers/deploying_sandboxed_containers.adoc

[id="sandboxed-containers-selecting-nodes_{context}"]
= Selecting nodes for {sandboxed-containers-first}

You can selectively install the Kata runtime on specific workers.

.Prerequisites

* You have {product-title} {product-version} installed on your cluster.
* You have installed the OpenShift CLI (oc).
* You have access to the cluster as a user with the `cluster-admin` role.

.Procedure

. Identify the labels that you want to use for selecting your nodes. For this example, use labels to selects to be chosen as candidates to run on your {sandboxed-containers-first} workloads. If the nodes exist, they are selected.
.. To apply a label to a node, run the following command:
+
[source,terminal]
----
$ oc label node <worker_node_name> <label>=<value>
----
+
This labels your worker node with the `<label>` label that has a value of `<value>`.

. To add a label selector, edit the `KataConfig` custom resource (CR):
+
[source,terminal]
----
$ oc edit kataconfig
----
.Example
+
[source,yaml]
----
  apiVersion: kataconfiguration.openshift.io/v1
  kind: KataConfig
  metadata:
    name: cluster-kataconfig
  spec:
    kataConfigPoolSelector:
      matchLabels:
         custom-kata-machine-pool: 'true'
----

.Verification

* You can check to see if the nodes in the `machine-config-pool` object are going through a config update.
** If you are using the default nodes, you can monitor the `machine-config-pool` resource by running:
+
[source,terminal]
----
$ watch oc get mcp worker
----
** If you are using selected nodes, you can monitor the `machine-config-pool` resource by running:
+
[source,terminal]
----
$ watch oc get mcp kata-oc
----

{'fraction_non_alphanumeric': 0.10660744031093837, 'fraction_numerical': 0.002498611882287618, 'mean_word_length': 3.7848605577689245, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5622127', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1064, 'n_words': 426}