Skip to content
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

AWS EKS custom AMI managed Node Group Bootstrap file not exists #680

Closed
tppalani opened this issue Jun 21, 2021 · 1 comment
Closed

AWS EKS custom AMI managed Node Group Bootstrap file not exists #680

tppalani opened this issue Jun 21, 2021 · 1 comment

Comments

@tppalani
Copy link

**Managed Node Group not able to Join EKS cluster **:

I have existing single cluster its in active state, When I'm planning to use custom AMI using launch template managed node group not able to join to the cluster:

**
1.bootstrap_user_data file has been created and its converted to base64 format as per the standard.

#!/bin/bash set -ex B64_CLUSTER_CA= <My eks cluster Certificate authority value> API_SERVER_URL= <My EKS cluster API server URl> /etc/eks/bootstrap.sh <cluster-name> --b64-cluster-ca $B64_CLUSTER_CA --apiserver-endpoint $API_SERVER_URL

  1. cat bootstrap_user_data | base64
  2. Launch template created via custom-configuration.json file with below data

cat config_custom_ami.json { "LaunchTemplateData": { "EbsOptimized": false, "ImageId": "ami-0e00c1f097aff7fe8", "InstanceType": "t3.small", "UserData": "bootstrap_user_data", "SecurityGroupIds": [ "sg-0e9b58499f42bcd4b" ] } }

4.Security group has been selected EKS cluster security group it was created automatically while creating EKS cluster first time.

  1. creating launch template using eksctl command
    aws ec2 create-launch-template --region eu-central-1 --launch-template-name my-template-name --version-description "first version " --cli-input-json file://custom.config.json

6.creating node group using eksctl command

aws eks create-nodegroup --region eu-central-1 --cluster-name my-cluster --nodegroup-name my-node-group --subnets subnet-<subnet1> subnet-<subnet2> --node-role 'arn:aws:iam::123456789:role/EKSNODEGROUP' --launch-template name=my-template-name

7.After executing node group creation command it was taking 20 min to create node group at the same time desired VM is created as part of auto scaling group but nodes group not able to join to the cluster after 20 min.
8. Connect to your Amazon EKS worker node instance with SSH and check kubelet agent logs

ssh -i my.key ec2-user@1.2.3.4 sudo -i cd /etc/eks/bootstrap.sh -bash: cd: /etc/eks: No such file or directory
**:

could you please some one help why my bootstrap.sh file not exists inside the /etc/eks location in other hand in AWS console launch template - Advanced tab - i can able to see my user data in decoded format.:

Environment:

  • AWS Region: eu-central-1

  • Instance Type(s): t3.medium

  • EKS Platform version (use aws eks describe-cluster --name <name> --query cluster.platformVersion): "eks.1"

  • Kubernetes version (use aws eks describe-cluster --name <name> --query cluster.version): "1.20"

  • AMI Version:

  • Kernel (e.g. uname -a): Linux ip-10-2-3-4.eu-central-1.compute.internal 4.14.232-176.381.amzn2.x86_64 Template is missing source_ami_id in the variables section #1 SMP Wed May 19 00:31:54 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  • Release information (run cat /etc/eks/release on a node):

@tppalani
Copy link
Author

Hi Verified two things between AWS AMI images and my own custom images.

  1. AWS AMI Image - EKS package is available in below path

cat /etc/eks/release BASE_AMI_ID="ami-004a571bc4ab7023a" BUILD_TIME="Wed May 26 18:04:13 UTC 2021" BUILD_KERNEL="5.4.117-58.216.amzn2.x86_64" ARCH="x86_64"

  1. My custom own image i don't have EKS release

cat /etc/eks/release cat: /etc/eks/release: No such file or directory

Could you please some one help me how to add this package into my own custom AMI image.

@cartermckinnon cartermckinnon closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants