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

:_mod-docs-content-type: PROCEDURE
[id="rosa-nodes-autonode-managing-create-nodeclass_{context}"]
= Create a non-default `OpenshiftEC2NodeClass`

[role="_abstract"]
Create a non-default resource when you need to customize the {ocp-short} version, VPC subnets, security groups, tags, metadata options, or capacity reservations for your worker nodes. The default `OpenshiftEC2NodeClass` is immutable.

[NOTE]
====
Modifying these resources, such as adding or changing AWS tags, security groups, and capacity reservation can cause a drift and initiate a new instance roll-out. See the _Additional resources_ for more information.
====

.Prerequisites

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

.Procedure

. Create an `OpenshiftEC2NodeClass` manifest:
+
[source,terminal]
----
$ cat > openshiftec2nodeclass.yaml <<'EOF'
apiVersion: karpenter.hypershift.openshift.io/v1
kind: OpenshiftEC2NodeClass
metadata:
  name: custom-nodeclass
spec:
  tags:
    team: "engineering"
EOF
----
+
For a complete list of configurable fields, see "OpenshiftEC2NodeClass configuration fields".

. Apply the manifest:
+
[source,terminal]
----
$ oc apply -f openshiftec2nodeclass.yaml
----

.Verification

. Verify that the `OpenshiftEC2NodeClass` resource was created:
+
[source,terminal]
----
$ oc get openshiftec2nodeclass
----
+
.Example output
[source,terminal]
----
NAME               READY   AGE
default            True    1h
custom-nodeclass   True    5s
----

. Verify the resource is ready by checking its status conditions:
+
[source,terminal]
----
$ oc get openshiftec2nodeclass/custom-nodeclass -o json | jq '.status.conditions'
----
+
If the `Ready` condition is `False`, see the troubleshooting guidance in _Additional resources_.
