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

Migrate to IMDS v2 #145

Merged
merged 1 commit into from
Jul 25, 2023
Merged

Migrate to IMDS v2 #145

merged 1 commit into from
Jul 25, 2023

Conversation

otterley
Copy link
Contributor

Description of changes:

Update Fluent Bit example configurations to use EC2 IMDS v2. This will make Fluent Bit work properly on instances launched from recent EKS optimized node AMIs which require HTTP tokens in their IMDS requests. It will continue to work even on older AMIs that don't require HTTP tokens. This is also the new default value for Fluent Bit's AWS plugin.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -206,7 +206,7 @@ data:
[FILTER]
Name aws
Match host.*
imds_version v1
imds_version v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To access IMDSv2 with the default hop limit of 1, does the daemonset of FLB need to run in the host network?

Copy link
Contributor Author

@otterley otterley Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the hop limit is set to 1, then, yes, the pod would have to use host networking. The default on modern EKS AMIs is set to 2, though. And IMDSv1 wouldn't work with such a hop limit if run as a pod with container networking.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah from what I've seen, managed EKS nodes are configured with hop limit of 2 by default. This doesn't account for self-managed nodes unfortunately.

@SaxyPandaBear SaxyPandaBear merged commit a9d75d1 into aws-samples:main Jul 25, 2023
@daithi-walker
Copy link

daithi-walker commented Aug 9, 2023

Is there any way to get a new release for the updated code? The last release was on Jun 29th, which is before this change got merged in.

image

https://github.com/aws-samples/amazon-cloudwatch-container-insights/tags

I am happy to give a release a go if someone could link to documentation on where I'd get some of the agent versions that would need to be updated... Just not obvious, even after reading the contributing doc. Thanks!

@SaxyPandaBear
Copy link
Contributor

Howdy 👋 not sure why this wasn't updated. Let me circle back with the team. We have a new release candidate staged atm so I'll try to make sure that the GitHub releases here get updated too when that rolls out globally

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

Successfully merging this pull request may close these issues.

4 participants