- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hello,
When you create an EKS Auto Mode cluster using the eksctl command you provided, the following occurs:
- A new VPC is created with public and private subnets.
- No NAT Gateway is set up due to the --vpc-nat-mode=Disable flag.
- An EKS cluster is created with public endpoint access.
- The cluster is associated with the private subnets.
When **only the public endpoint **access for the cluster is enabled, Kubernetes API requests that originate from within your cluster’s VPC (such as worker node to control plane communication) leave the VPC, but not Amazon’s network. In order for nodes to connect to the control plane, the worker node subnets **must have a route to an internet gateway or a route to a NAT gateway **where they can use the public IP address of the NAT gateway.
As the worker nodes unable to establish communication with the EKS control plane, they are unable to not join the cluster. The worker nodes will be launched, but will not join the cluster.
Therefore, to resolve this issue, create a NAT gateway, and attach it to the private subnets.
Else, if you don't want to use NAT Gatewauy, then you can also modify the cluster endpoint access to either "Public & Private" or only Private. When only the private endpoint is enabled, all traffic to your cluster API server must come from within your cluster’s VPC or a connected network. There is no public access to your API server from the internet. Any kubectl commands must come from within the VPC or a connected network. For a fully private cluster, VPC endpoints such as ec2, ecr.api, ecr.dkr, s3, & sts are required.
Reference: [1] https://repost.aws/knowledge-center/eks-worker-nodes-cluster
The issue you're experiencing with EKS Auto Mode is likely related to a few factors:
-
Node Scheduling: EKS Auto Mode starts with zero nodes by default and scales up as needed. When you apply your deployment, the system needs time to recognize the resource requirements and provision the necessary nodes.
-
VPC NAT Mode: You've disabled NAT mode in your cluster creation command (--vpc-nat-mode=Disable). This could prevent nodes from properly communicating with the control plane and joining the cluster.
-
NodePool Configuration: EKS Auto Mode requires a properly configured NodePool to manage node creation. Ensure you have a NodePool defined that matches your deployment's requirements.
To resolve this:
-
Enable NAT mode when creating your cluster. Remove the --vpc-nat-mode=Disable flag from your eksctl command.
-
After cluster creation, check if a default NodePool was created. If not, create one that matches your deployment's resource requirements.
-
In your deployment YAML, add a nodeSelector to ensure pods are scheduled on Auto Mode nodes:
spec: template: spec: nodeSelector: eks.amazonaws.com/compute-type: ec2-auto -
Allow more time for node provisioning. EKS Auto Mode may take a few minutes to recognize the need for nodes and create them.
-
Check the status of your NodePool and any NodeClaims:
kubectl get nodepools kubectl get nodeclaims -
Review the events in your cluster for any errors:
kubectl get events --sort-by=.metadata.creationTimestamp
If problems persist, ensure your IAM roles and policies are correctly set up for EKS Auto Mode, and that there are no issues with your VPC or subnet configurations.
Remember, EKS Auto Mode is designed for ease of use, but it still requires proper configuration and may have a slight delay in initial node provisioning compared to pre-provisioned node groups.
Sources
Troubleshoot EKS Auto Mode - Amazon EKS
How to debug Auto-Mode custom NodePool | AWS re:Post
Contenus pertinents
- demandé il y a 10 mois
- demandé il y a 3 ans
- demandé il y a 10 mois
- AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a 2 ans

I can run kubectl commands like
kubectl get nodeclaim,kubectl describe nodeclaim nodeclaimnamejust fine though; that's how I got the above events. Is this still applicable to the "nodes can't scale up" problem?I reread your post & determined my comment was misunderstanding you. With only public enabled (what I was using) I should be able to access it with kubectl, but the nodes / pods themselves can't access as they need to. I gave my cluster public & private access with
eksctl utils update-cluster-vpc-config --cluster=<clustername> --private-access=true --public-access=true --approve& now my scaleup is still not succeeding, but I believe I am getting a new error. Specifically my nodeclaims now have READY=TRUE rather than UNKNOWN & I have some ready nodes. My pods now have Status ImagePullBackOff rather than uhh whatever it was before, so they're still not Ready but that's the next problem. Thanks!