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

:_mod-docs-content-type: CONCEPT
[id="autonode-troubleshooting-overview_{context}"]
= About {autonode} troubleshooting

[role="_abstract"]
The {autonode} uses the Karpenter controller to provide automated node provisioning in OpenShift clusters. When the {autonode} fails to provision nodes or reports configuration errors, you can diagnose and resolve issues by examining Karpenter resource status, AWS infrastructure tags, and AWS Identity and Access Management (IAM) permissions.

{autonode} troubleshooting addresses the main failure categories:

Controller deployment issues:: Karpenter Custom Resource Definitions (CRDs) do not appear after enabling the {autonode}, preventing you from creating or managing Karpenter resources.

AWS resource discovery failures:: The EC2NodeClass resource cannot discover AWS subnets or security groups because required discovery tags are missing or incorrect.

IAM permission issues:: The control plane Operator does not have the authorization to create tags on AWS resources, preventing Karpenter from properly configuring security groups.

[id="autonode-troubleshooting-diagnostic-workflow_{context}"]
== General diagnostic workflow

Follow this workflow to diagnose and resolve {autonode} issues:

. Identify the symptom by checking which Karpenter resources are missing or not ready.
. Gather diagnostic data using `oc` commands to inspect custom resource status and AWS CLI commands to verify infrastructure configuration.
. Analyze the root cause by comparing observed resource state with expected configuration.
. Apply the resolution by adding missing tags, updating IAM policies, or verifying capabilities.
. Verify the fix by confirming that Karpenter resources reach ready status and automatic scaling functions correctly.

[id="autonode-troubleshooting-escalating_{context}"]
== When to escalate to Red{nbsp}Hat Support

Escalate to Red{nbsp}Hat Support in these situations:

* Karpenter CRDs do not appear after 5 minutes and the Karpenter controller pod is not running.
* EC2NodeClass remains not ready after adding all required discovery tags and waiting 60 seconds.
* IAM policies are correctly attached but CloudTrail continues showing authorization errors.

When escalating, provide:

* Cluster ID
* Output of `rosa describe cluster -c $CLUSTER_ID -o json`
* Output of `oc get ec2nodeclass/default -o json`
* Output of `oc get pods -n kube-system`
* CloudTrail event details for authorization errors
