-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instance failed to join status despite that instance is actually joined #719
Comments
Hi @Alex-Sizov,
|
Hi @ravisinha0506 !
|
@ravisinha0506 I am also facing the same issue as @Alex-Sizov +1 |
@Alex-Sizov When creating a Managed node group with a launch template, the behavior differs based on whether an AMI has been specified in the launch template or not. When no AMI is present in the launch template (as is the case for you, if I'm reading your gist correctly), EKS will merge in a section of MIME multi-part user data to the user data contents you've passed in. The part EKS merges in will attempt to bootstrap your worker node as well. Since MIME multiparts are executed in order, this means your bootstrapping happens first and the EKS bootstrapping becomes a no-op. As a result, your worker nodes don't have the required labels for EKS to associate them with a node group. You can fix this by specifying the worker AMI you'd like to use within your launch template and pass that to EKS. See this documentation for more details. |
I've removed |
What happened:
When creating eks node group with launch template with custom userdata it fails with "Instance failed to join the kubernetes cluster" error. But kubectl get node command shows nodes created by the node group.
What you expected to happen:
Node successfully joins the cluster.
How to reproduce it (as minimally and precisely as possible):
Create node group using launch template with custom userdata script
Anything else we need to know?:
Without using launch template it works fine.
All resources were created using terraform code available in a gist
Environment:
uname -a
): Linux ip-10-0-5-52.us-west-2.compute.internal 5.4.110-54.189.amzn2.x86_64 Template is missing source_ami_id in the variables section #1 SMP Mon Apr 26 21:25:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linuxcat /etc/eks/release
on a node):The text was updated successfully, but these errors were encountered: