mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 06:46:26 +01:00
84 lines
2.9 KiB
Plaintext
84 lines
2.9 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * hosted_control_planes/hcp-deploy-virt.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="hcp-virt-add-node_{context}"]
|
|
= Adding node pools
|
|
|
|
You can create node pools for a hosted cluster by specifying a name, number of replicas, and any additional information, such as memory and CPU requirements.
|
|
|
|
.Procedure
|
|
|
|
. To create a node pool, enter the following information. In this example, the node pool has more CPUs assigned to the VMs:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
export NODEPOOL_NAME=${CLUSTER_NAME}-extra-cpu
|
|
export WORKER_COUNT="2"
|
|
export MEM="6Gi"
|
|
export CPU="4"
|
|
export DISK="16"
|
|
|
|
$ hcp create nodepool kubevirt \
|
|
--cluster-name $CLUSTER_NAME \
|
|
--name $NODEPOOL_NAME \
|
|
--node-count $WORKER_COUNT \
|
|
--memory $MEM \
|
|
--cores $CPU \
|
|
--root-volume-size $DISK
|
|
----
|
|
|
|
. Check the status of the node pool by listing `nodepool` resources in the `clusters` namespace:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get nodepools --namespace clusters
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE
|
|
example example 5 5 False False 4.x.0
|
|
example-extra-cpu example 2 False False True True Minimum availability requires 2 replicas, current 0 available
|
|
----
|
|
+
|
|
Replace `4.x.0` with the supported {product-title} version that you want to use.
|
|
|
|
. After some time, you can check the status of the node pool by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc --kubeconfig $CLUSTER_NAME-kubeconfig get nodes
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME STATUS ROLES AGE VERSION
|
|
example-9jvnf Ready worker 97s v1.27.4+18eadca
|
|
example-n6prw Ready worker 116m v1.27.4+18eadca
|
|
example-nc6g4 Ready worker 117m v1.27.4+18eadca
|
|
example-thp29 Ready worker 4m17s v1.27.4+18eadca
|
|
example-twxns Ready worker 88s v1.27.4+18eadca
|
|
example-extra-cpu-zh9l5 Ready worker 2m6s v1.27.4+18eadca
|
|
example-extra-cpu-zr8mj Ready worker 102s v1.27.4+18eadca
|
|
----
|
|
|
|
. Verify that the node pool is in the status that you expect by entering this command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get nodepools --namespace clusters
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE
|
|
example example 5 5 False False 4.x.0
|
|
example-extra-cpu example 2 2 False False 4.x.0
|
|
----
|
|
+
|
|
Replace `4.x.0` with the supported {product-title} version that you want to use. |