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

Bug: Error occurred while upgrading Node Group in EC2 instance created through Karpenter #125

Closed
namejsjeongkr opened this issue May 31, 2023 · 15 comments
Labels
bug Something isn't working closing-soon

Comments

@namejsjeongkr
Copy link

namejsjeongkr commented May 31, 2023

Expected Behaviour

I tried to upgrade via eksupgrade CLI from 1.25 to 1.26.

Unfortunately, I've got an error about checking node group stage.
I created EKS Cluster via Terraform and there's no issues about it.

And �the instance where the error occurred is an instance created through Karpenter.

As far as I know, Karpenter doesn't generate nodes via ASG, do I need an ASG name to use the eksupgrade CLI ?

Please let me know what's the best way to upgrade EKS Cluster that in using Karpenter via eksupgrade CLI.

Current Behaviour

스크린샷 2023-05-31 17 47 42

Code snippet

eksupgrade --force <CLUSTER_NAME> 1.26 ap-northeast-2

Possible Solution

No response

Steps to Reproduce

eksupgrade --force <CLUSTER_NAME> 1.26 ap-northeast-2

Amazon EKS upgrade version

1.26

Python runtime version

3.11

Packaging format used

PyPi

Debugging logs

i-0f8bafc14f3d4bc9c cannot be upgraded because the cluster version is not compatible with the node version
Error occurred while checking node group details - Error: cannot access local variable 'autoscale_group_name' where it is not associated with a value

Post flight unsuccessful because of the following errors: ["Error occurred while checking node group details cannot access local variable 'autoscale_group_name' where it is not associated with a value"]
Post flight check for cluster <CLUSTER_NAME> failed after it upgraded
@namejsjeongkr namejsjeongkr added the bug Something isn't working label May 31, 2023
@namejsjeongkr namejsjeongkr changed the title Bug: Fail to upgrade from 1.25 to 1.26 Bug: Unfortunately failed to upgrade from 1.25 to 1.26 May 31, 2023
@namejsjeongkr namejsjeongkr changed the title Bug: Unfortunately failed to upgrade from 1.25 to 1.26 Bug: Error occurred while upgrading Node Group in EC2 instance created through Karpenter Jun 7, 2023
@github-actions
Copy link

github-actions bot commented Jul 8, 2023

This issue has not received any attention in 30 days. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@namejsjeongkr
Copy link
Author

I'm looking forward to your reply

@bryantbiggs
Copy link
Member

where does the Karpenter controller pods run in your cluster, are they deployed on EKS Fargate?

@namejsjeongkr
Copy link
Author

Thanks for replying my case.
No. I deployed on EKS EC2 Instances.

@bryantbiggs
Copy link
Member

Ok, and how did that instance get created

@namejsjeongkr
Copy link
Author

namejsjeongkr commented Jul 26, 2023

@bryantbiggs
When I created an EKS cluster, I provisioned two Managed NodeGroups. Nodes that are subsequently created are set up to be provisioned through Karpenter.

So, When I tried to upgrade EKS Cluster, �there was a mix of instances created through Managed NodeGroup and Karpenter.

@bryantbiggs
Copy link
Member

ah ok - now I think I (might) know the issue. eksupgrade is looking for the parent ASG of each instance but it won't find any for Karpenter nodes, got it!

@namejsjeongkr
Copy link
Author

ah ok - now I think I (might) know the issue. eksupgrade is looking for the parent ASG of each instance but it won't find any for Karpenter nodes, got it!

I'm curious about it.. As far as I know, Karpenter is developed by AWS. Why didn't you consider this function ? You know, Karpenter doesn't use ASG(Auto Scaling Group) to provision EC2 instances.

@bryantbiggs
Copy link
Member

This project was developed by previous colleagues long before Karpenter existed so I suspect that plays a large factor

@namejsjeongkr
Copy link
Author

@bryantbiggs, I appreciate your reply. I totally understood what you're saying and I'm looking forward to develop feature to upgrade smoothly Karpenter nodes.

@github-actions
Copy link

This issue has not received any attention in 30 days. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@namejsjeongkr
Copy link
Author

@bryantbiggs, Is there anything to update for me ? If you're too busy to develop this feature, I could help you !

@github-actions
Copy link

This issue has not received any attention in 30 days. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@namejsjeongkr
Copy link
Author

I'll develop the function and post Pull Request.

@github-actions
Copy link

This issue has not received any attention in 30 days. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closing-soon
Projects
None yet
Development

No branches or pull requests

2 participants