Interview Prep/Kubernetes/EKS-specific issues

A managed node group fails with `NodeCreationFailure: Instances failed to join the kubernetes cluster`.

IntermediateTroubleshootingEKS-specific issues
Answer

Likely causes → Nodes boot but cannot register: no route to the cluster endpoint (private subnets without NAT and no VPC endpoints for ECR/S3/STS/EC2), security groups blocking 443 to the control plane, the node IAM role missing policies (AmazonEKSWorkerNodePolicy, AmazonEC2ContainerRegistryReadOnly, CNI policy), a missing access entry, or broken custom user data/AMI.

Diagnose →

aws eks describe-nodegroup --cluster-name prod --nodegroup-name ng-1 --query 'nodegroup.health'
# On an instance via SSM
sudo journalctl -u kubelet --no-pager | tail -50
sudo cat /var/log/cloud-init-output.log | tail -50

Fix → Fix networking (NAT or interface endpoints for ecr.api, ecr.dkr, sts, ec2, plus S3 gateway endpoint), attach the node policies, or fix the launch template user data.

Prevent → Use the EKS-optimized AMI and managed node groups; run the AWS AWSSupport-TroubleshootEKSWorkerNode runbook in pipelines for new node configs.

All Kubernetes questions

More on EKS-specific issues