// Module included in the following assemblies:
//
// * support/troubleshooting/rosa-troubleshooting-autonode.adoc

:_mod-docs-content-type: REFERENCE
[id="karpenter-resource-readiness-conditions_{context}"]
= Karpenter resource readiness conditions

[role="_abstract"]
The `EC2NodeClass` resource reports readiness through status conditions that indicate whether Karpenter successfully discovered and validated AWS resources. Each condition reports a boolean status and explains why the condition is true or false. Understanding these conditions helps you identify which AWS resources require configuration changes.

.EC2NodeClass status conditions
[cols="1,1,3", options="header"]
|===
|Condition
|Status values
|Meaning

|`AMIsReady`
|`True` or `False`
|The Amazon Machine Images (AMI) selector matched available AMIs in the AWS region.
If `False`, the specified AMI selector did not match any AMIs accessible to your AWS account.

|`SubnetsReady`
|`True` or `False`
|The subnet selector matched private subnets with the required Karpenter discovery tag.
If `False`, no subnets in your Virtual Private Cloud (VPC) have the `karpenter.sh/discovery` tag with the value expected by the `EC2NodeClass`.

|`SecurityGroupsReady`
|`True` or `False`
|The security group selector matched security groups with the required Karpenter discovery tag.
If `False`, no security groups have the `karpenter.sh/discovery` tag with the value expected by the `EC2NodeClass`.

|`InstanceProfileReady`
|`True` or `False`
|The IAM instance profile exists and is accessible to Karpenter.
If `False`, the specified instance profile name is incorrect or the profile does not exist in your AWS account.

|`ValidationSucceeded`
|`True` or `False`
|The EC2NodeClass specification passed validation.
If `False`, the EC2NodeClass contains invalid configuration values or references non-existent resources.

|`Ready`
|`True` or `False`
|Overall readiness status.
This condition is `True` only when all dependent conditions (`AMIsReady`, `SubnetsReady`, `SecurityGroupsReady`, `InstanceProfileReady`, `ValidationSucceeded`) are `True`.
If `False`, the message field lists which conditions are not ready.
|===

[id="karpenter-resource-readiness-conditions-common-failures_{context}"]
== Common failure messages

When EC2NodeClass conditions report `False` status, the message field provides details about the failure:

`SubnetSelector` did not match any Subnets:: No subnets in your VPC have the required `karpenter.sh/discovery` tag. 
Add the tag to all private subnets where Karpenter should provision nodes.

`SecurityGroupSelector` did not match any `SecurityGroups`:: No security groups have the required `karpenter.sh/discovery` tag.
Add the tag to the default security group and any additional security groups Karpenter should use.

`UnhealthyDependents`:: The `Ready` condition shows this message when one or more dependent conditions are `False`.
The message lists which specific conditions are not ready, for example: `SecurityGroupsReady=False, SubnetsReady=False`.
