// Module included in the following assemblies:
//
// * rosa_cluster_admin/autonode/rosa-autonode-nodepools.adoc

:_mod-docs-content-type: PROCEDURE
[id="rosa-nodes-autonode-managing-nodepool_{context}"]
= Create a node pool

[role="_abstract"]
Create a node pool to define the compute capacity that the {autonode} can provision.

.Prerequisites

* The {autonode} is enabled on the cluster.
* The default `OpenshiftEC2NodeClass` is in a `Ready` state.
* You have installed the `oc` CLI and are logged in to the cluster.

.Procedure

. Create a node pool manifest:
+
[source,terminal]
----
$ cat > nodepool.yaml <<'EOF'
apiVersion: karpenter.sh/v1
kind: NodePool
metadata:
  name: default-np
spec:
  template:
    metadata:
      labels:
        autonode: "true"
    spec:
      requirements:
      - key: node.kubernetes.io/instance-type
        operator: In
        values:
        - c5.xlarge
      - key: karpenter.sh/capacity-type
        operator: In
        values: ["on-demand"]
      nodeClassRef:
        group: karpenter.k8s.aws
        kind: EC2NodeClass
        name: default
EOF
----
where:
`nodeClassRef.kind`::
Required field that must use the `EC2NodeClass` type.
`spec.labels`::
Optional field that you can use to place pods by using labels.
+
[NOTE]
====
For a list of all requirements available under `spec.requirements`, see the _Additional resources_.
====

. Apply the node pool:
+
[source,terminal]
----
$ oc apply -f nodepool.yaml
----

. Verify the node pool is ready:
+
[source,terminal]
----
$ oc get nodepool
----
+
.Example output
[source,terminal]
----
NAME         NODECLASS   NODES   READY   AGE
default-np   default     0       True    3s
----
