Skip to main content

Node-Level Debugging

20 min read

Node Join Failure Debugging​

Nodes can fail to join a cluster for a variety of reasons. The following are the eight most common causes and how to diagnose them.

Common causes of node join failures:

  1. Node IAM Role not registered in aws-auth ConfigMap (or Access Entry not created) — node cannot authenticate to the API server
  2. Bootstrap script ClusterName does not match the actual cluster name — kubelet attempts to connect to the wrong cluster
  3. Node Security Group does not allow communication with the control plane — TCP 443 (API server) and TCP 10250 (kubelet) are required
  4. Auto-assign public IP disabled on public subnets — cannot access the internet on clusters with only a public endpoint enabled
  5. VPC DNS settings issue — enableDnsHostnames or enableDnsSupport disabled
  6. STS regional endpoint disabled — IAM authentication fails due to failed STS calls
  7. Instance profile ARN registered in aws-auth instead of the node IAM Role ARN — aws-auth must contain only the Role ARN
  8. Missing kubernetes.io/cluster/<cluster-name> = owned tag (self-managed nodes) — EKS does not recognize the node as cluster-owned

Diagnostic commands:

# Check node bootstrap logs (after SSM session)
sudo journalctl -u kubelet --no-pager | tail -50
sudo cat /var/log/cloud-init-output.log | tail -50

# Check Security Group rules
aws ec2 describe-security-groups --group-ids $CLUSTER_SG \
--query 'SecurityGroups[].IpPermissions' --output table

# Check VPC DNS settings
aws ec2 describe-vpc-attribute --vpc-id $VPC_ID --attribute enableDnsHostnames
aws ec2 describe-vpc-attribute --vpc-id $VPC_ID --attribute enableDnsSupport
ARN to register in aws-auth

The aws-auth ConfigMap must contain the IAM Role ARN (arn:aws:iam::ACCOUNT:role/...), not the instance profile ARN (arn:aws:iam::ACCOUNT:instance-profile/...). This mistake is very common and a major cause of node join failures.

Node NotReady Decision Tree​

Figure 1. Node NotReady diagnosis decision tree

Expand the diagram to read labels and follow connections.
Diagram

kubelet / containerd Debugging​

# Connect to node via SSM
aws ssm start-session --target <instance-id>

# Check kubelet status
systemctl status kubelet
journalctl -u kubelet -n 100 -f

# Check containerd status
systemctl status containerd

# Check container runtime status
crictl pods
crictl ps -a

# Check logs for a specific container
crictl logs <container-id>
SSM Access Prerequisites

SSM access is optional. To use it, attach the AmazonSSMManagedInstanceCore policy (or equivalent permissions) to the node IAM Role yourself; it is not included by default in EKS Managed Node Groups. The policies required on the EKS node role are AmazonEKSWorkerNodePolicy and AmazonEC2ContainerRegistryPullOnly. When using a custom AMI, also verify that the SSM Agent is installed.

Diagnosing and Resolving Resource Pressure​

# Check node status
kubectl describe node <node-name>

Table 1. Resource pressure Conditions with threshold, diagnostic command, and resolution

ConditionDefault threshold (kubelet hard eviction)Diagnostic CommandResolution
DiskPressurenodefs.available < 10%, imagefs.available < 15% (each inodesFree < 5%)df -h and df -i for disk/inode usage, du -sh /var/lib/* to find what is consuming space (after SSM)First identify what fills the disk (images, container logs, writable layers, or inodes); then if images are the cause run crictl rmi --prune, or if stopped containers are the cause run crictl rm
MemoryPressurememory.available < 100Mifree -m (after SSM)Evict low-priority Pods, adjust memory requests/limits, replace the node
PIDPressureNo built-in kubelet percentage default (inactive unless pid.available is configured; the 5% below is an example setting)ps aux | wc -l (after SSM)Increase kernel.pid_max; identify and restart containers leaking PIDs

Karpenter Node Provisioning Debugging​

# Check Karpenter controller logs
kubectl logs -f deployment/karpenter -n kube-system

# Check NodePool status
kubectl get nodepool
kubectl describe nodepool <nodepool-name>

# Check EC2NodeClass
kubectl get ec2nodeclass
kubectl describe ec2nodeclass <nodeclass-name>

# When provisioning fails, check:
# 1. Whether NodePool limits are exceeded
# 2. Whether EC2NodeClass subnet/Security Group selectors are correct
# 3. Whether Service Quotas for the instance types are sufficient
# 4. Whether Pod nodeSelector/affinity matches NodePool requirements
Karpenter v1 API Changes

The resource renames Provisioner → NodePool and AWSNodeTemplate → EC2NodeClass were first introduced in Karpenter v0.32 (beta) as the v1beta1 API, and promoted to the stable karpenter.sh/v1 API in v1.0. Migration is required when coming from the v0.x alpha APIs (Provisioner, AWSNodeTemplate). Also update the API group to karpenter.sh/v1.

Managed Node Group Error Codes​

Check Managed Node Group health status to diagnose provisioning and operational issues.

# Check node group health
aws eks describe-nodegroup --cluster-name $CLUSTER --nodegroup-name $NODEGROUP \
--query 'nodegroup.health' --output json
🖥️ Managed Node Group error codes
aws eks describe-nodegroup --query 'nodegroup.health'
🔴AccessDenied
Kubernetes RBAC objects for node management, such as the eks:node-manager ClusterRole/ClusterRoleBinding, were deleted or changed
→ Restore the deleted RBAC resources such as the eks:node-manager ClusterRole/ClusterRoleBinding (a K8s RBAC problem, not a node IAM permission problem)
🟡AmiIdNotFound
The AMI ID in the Launch Template does not exist
→ Update to a valid EKS optimized AMI ID
🔴AutoScalingGroupNotFound
The ASG was deleted or does not exist
→ Re-creating the ASG with the same name/settings may recover it (try this first). If not, delete and re-create the node group
🔴ClusterUnreachable
Nodes cannot connect to the EKS API server
→ Check VPC settings, security groups, and endpoint reachability
🟡Ec2SecurityGroupNotFound
The specified security group was deleted
→ The node group's security group reference cannot be changed (immutable). A deleted resource is not replaced by another SG, so the node group usually has to be re-created
🟡Ec2LaunchTemplateNotFound
The Launch Template was deleted
→ A deleted Launch Template ID is not restored. Version updates apply only within the same template lineage, so the node group usually has to be re-created
⚪Ec2LaunchTemplateVersionMismatch
Launch Template version mismatch
→ Check and correct the version the node group references
🟡IamInstanceProfileNotFound
The instance profile does not exist
→ Re-create the IAM instance profile
🔴IamNodeRoleNotFound
The node IAM Role was deleted
→ Re-create the IAM Role and attach the required policies
🟡AsgInstanceLaunchFailures
EC2 instance launch failure (insufficient capacity, etc.)
→ Add other instance types/AZs, check Service Quotas
🟡NodeCreationFailure
General node creation failure
→ Check the detailed error in CloudTrail
🟡InstanceLimitExceeded
EC2 instance limit exceeded
→ Request a limit increase in Service Quotas
🟡InsufficientFreeAddresses
The subnets associated with the node group lack available IP addresses
→ The subnet list of an existing managed node group cannot be changed with UpdateNodegroupConfig. Create a new node group in subnets with enough free IPs (if needed, subnets created from a secondary CIDR associated with the VPC) and move the workloads
⚪InternalFailure
AWS internal error
→ Retry; if it persists, contact AWS Support

AccessDenied Recovery — Check the eks:node-manager ClusterRole:

AccessDenied errors typically occur when the eks:node-manager ClusterRole or ClusterRoleBinding is deleted or modified.

# Check eks:node-manager ClusterRole
kubectl get clusterrole eks:node-manager
kubectl get clusterrolebinding eks:node-manager
AccessDenied Recovery

If the eks:node-manager ClusterRole/ClusterRoleBinding is missing, EKS does not restore it automatically. Recover it using one of the following methods:

Method 1: Manual re-creation (recommended)

# eks-node-manager-role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: eks:node-manager
rules:
- apiGroups: ['']
resources: [pods]
verbs: [get, list, watch, delete]
- apiGroups: ['']
resources: [nodes]
verbs: [get, list, watch, patch]
- apiGroups: ['']
resources: [pods/eviction]
verbs: [create]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: eks:node-manager
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: eks:node-manager
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: User
name: eks:node-manager
kubectl auth reconcile -f eks-node-manager-role.yaml

Before applying, use kubectl describe clusterrole eks:node-manager and kubectl describe clusterrolebinding eks:node-manager to confirm that the objects are missing or differ from the example above; after applying, retry the node group operation that failed. This is the recovery procedure documented in the AWS EKS troubleshooting guide.

Methods 2 and 3 are not documented by AWS as recovery procedures. EKS states that it sets up these resources as part of onboarding with managed node groups, but whether creating or upgrading a node group in a cluster that already has node groups re-creates deleted RBAC objects is unverified; primary source not verified as of 2026-10-29. Try them only when Method 1 cannot be applied, and afterwards confirm with the kubectl describe commands above that the objects were restored.

Method 2: Recreate the node group (unverified alternative)

# Whether creating a new node group re-creates the RBAC resources is unverified
eksctl create nodegroup --cluster=<cluster-name> --name=<new-nodegroup-name>

Method 3: Upgrade the node group (unverified alternative)

# RBAC reconciliation may be triggered during upgrade
eksctl upgrade nodegroup --cluster=<cluster-name> --name=<nodegroup-name>

Note: The Kubernetes API server auto-reconciles default system ClusterRoles (system:*), but EKS-specific ClusterRoles (eks:*) are not auto-restored. Back up RBAC resources before deleting them.

Node Bootstrap Debugging with Node Readiness Controller​

New Kubernetes Feature (February 2026)

The Node Readiness Controller is a new project announced on the Kubernetes official blog that declaratively addresses early scheduling problems during node bootstrap.

Problem Context​

In traditional Kubernetes, workloads are scheduled immediately when a node reaches Ready state. However, many times the node is not actually fully ready:

Table 2. Symptoms and impact of incomplete components in Ready state

Incomplete ComponentSymptomsImpact
GPU driver/firmware loadingnvidia-smi failure, Pod CrashLoopBackOffGPU workload failures
CNI plugin initializingPod IP not allocated, NetworkNotReadyNetworking unavailable
CSI driver not registeredPVC Pending, volume mount failuresStorage unavailable
Security agent not installedCompliance violationSecurity policy not met

How Node Readiness Controller Works​

The Node Readiness Controller declaratively manages custom taints, deferring workload scheduling until all infrastructure requirements are satisfied:

Figure 2. Node Readiness Controller scheduling deferral flow

Expand the diagram to read labels and follow connections.
Diagram
Bootstrap scheduling race

Because the flow above applies the taint after kubelet Ready, a short window exists between the node becoming Ready and the taint being applied, during which Pods can still be scheduled. To eliminate this race, register the node with the taint from the start using kubelet --register-with-taints (the controller removes it once conditions are met), or hold scheduling on the Pod side with schedulingGates.

Debugging Checklist​

If a node is Ready but Pods are not scheduling:

# 1. Check custom readiness taints on the node
kubectl get node <node-name> -o jsonpath='{.spec.taints}' | jq .

# 2. Filter readiness.k8s.io-related taints
kubectl get nodes -o json | jq '
.items[] |
select(.spec.taints // [] | any(.key | startswith("readiness.k8s.io/"))) |
{name: .metadata.name, taints: [.spec.taints[] | select(.key | startswith("readiness.k8s.io/"))]}
'

# 3. Check mismatch between Pod tolerations and node taints
kubectl describe pod <pending-pod> | grep -A 20 "Events:"

Using schedulingGates, scheduling readiness can also be controlled on the Pod side:

apiVersion: v1
kind: Pod
metadata:
name: gated-pod
spec:
schedulingGates:
- name: "example.com/gpu-validation" # Pod waits until this gate is removed
containers:
- name: app
image: app:latest
# Check Pods with schedulingGates
kubectl get pods -o json | jq '
.items[] |
select(.spec.schedulingGates != null and (.spec.schedulingGates | length > 0)) |
{name: .metadata.name, namespace: .metadata.namespace, gates: .spec.schedulingGates}
'

The AWS Load Balancer Controller injects a readiness gate into Pods in a namespace when that namespace carries the elbv2.k8s.aws/pod-readiness-gate-inject=enabled label. The gate holds the Pod's transition to Ready until the ALB/NLB target becomes Healthy, not merely registered:

# Check Readiness Gate status
kubectl get pod <pod-name> -o jsonpath='{.status.conditions}' | jq '
[.[] | select(.type | contains("target-health"))]
'

# Check whether readiness gate injection is enabled on a namespace
kubectl get namespace <ns> -o jsonpath='{.metadata.labels.elbv2\.k8s\.aws/pod-readiness-gate-inject}'
Comparing Readiness Features

Table 3. Comparison of Readiness features by target, control, and status

FeatureTargetControlStatus
Node Readiness ControllerNodeTaint-basedNew (2026.02)
Pod Scheduling ReadinessPodschedulingGatesGA (K8s 1.30)
Pod Readiness GatesPodReadiness ConditionsGA (AWS LB Controller)

Using eks-node-viewer​

eks-node-viewer is a terminal tool that visualizes the scheduled pod resource requests against the node's allocatable capacity (and cost). It shows requests versus capacity, not real-time resource utilization.

# Default usage (CPU view)
eks-node-viewer

# View CPU and memory together
eks-node-viewer --resources cpu,memory

# View only a specific NodePool
eks-node-viewer --node-selector karpenter.sh/nodepool=<nodepool-name>