Comments (7)
Hi @kavicse87 !
To connect aws-node-termination-handler (NTH) and AEMM together, you'll need to configure NTH to use a different Instance Metadata URL than the default 169.254.169.254 address.
Checkout the helm readme configuration table for NTH: https://github.com/aws/aws-node-termination-handler/blob/master/config/helm/aws-node-termination-handler/README.md
Recently, @brycahta converted AWS Node Termination Handler's end-to-end tests to use AEMM. You can checkout the e2e code that configure NTH to use AEMM rather than the real EC2 Instance Metadata Service here: https://github.com/aws/aws-node-termination-handler/blob/master/test/e2e/spot-interruption-test#L36\
AEMM can be deployed on one or multiple nodes in the cluster. It is accessed as a service so it doesn't matter if you have 1 or 100 copies installed on the cluster.
Since you would like to monitor to see what happens when the fake interruption is received, you'll need to setup a kubectl log tail on the NTH pod, or if you have prometheus configured, you can scrape NTH for metrics on interruptions.
To make it a little easier to catch the mock spot interruption in action, you can configure AEMM to delay the spot ITN for a period of time using the mockDelaySec
argument. Check out this section of the docs for an example: https://github.com/aws/amazon-ec2-metadata-mock/tree/master/helm/amazon-ec2-metadata-mock#user-content-installing-the-chart-with-overridden-values-for-aemm-configuration
Hope this helps!
from amazon-ec2-metadata-mock.
Adding to this, I'm bit confused because it says it's not a real spot interruption.. It's a mock spot interruption.. Even if it's a mock interruption then node termination handler will handle that interruption and drian the nodes right ? But how to connect it with the spot node is a question again ?
from amazon-ec2-metadata-mock.
Thanks @bwagner5 let me go through this and let you know..
from amazon-ec2-metadata-mock.
@bwagner5 Please clarify.. If I configure the AEMM and connect it with node termination handler.. So the spot interruption, I meant the mock spot interruption that AEMM generates will be handled by AWS node termination handler and that will start the draining process of the spot node by any chance to see the pods are migrating to the other node's as expected ? This test is pending since the spot instance c5d.large not getting interrupted as we couldn't get any spot instance from the spot pool which is >20%.. Please advise how can I test this and see the actual functionality tested for the aws node termination handler..
from amazon-ec2-metadata-mock.
@bwagner5 please advise.
from amazon-ec2-metadata-mock.
@kavicse87 Configuring node termination handler to listen to AEMM rather than the actual EC2 Instance Metadata (169.254.169.254) will cause a mock interruption even which node-termination-handler will handle. There's not even a need for the node to be a spot instance that you are testing on.
from amazon-ec2-metadata-mock.
Hi @kavicse87 -- closing this as it's been stale for over 2weeks.
Please re-open if you need support, Thanks!
from amazon-ec2-metadata-mock.
Related Issues (20)
- standard_init_linux.go:228: exec user process caused: exec format error HOT 3
- Deploy Helm Chart HOT 3
- Add `tags/instance` path HOT 2
- Emulate specifying `PUT` response hop limit HOT 1
- /latest/user-data ? HOT 2
- Conform the real IMDS by not listing dirs
- Dump all metadata to a file HOT 3
- Userdata formatting HOT 1
- Userdata in getHandlerPairs()? HOT 1
- marketplaceProductCodes field is typed as a string instead of a list of strings HOT 1
- Please document how to serve real credentials in the mocked data HOT 11
- Passing null value in AEMM config parameter HOT 6
- Optionally support the removal of instances tags within returned metadata HOT 2
- [bug] cannot add a new tag using config overrides HOT 3
- Provide this mock as a Java library HOT 2
- [feature request] Watch config file for changes and reload HOT 2
- Programmatic use in Go tests HOT 2
- Incorrect Content-Type response header HOT 4
- IAM credentials should have realistic values HOT 2
- Missing EC2ws header HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-ec2-metadata-mock.