Early Boot Config, apiclient route for elastic load balancer #1579
-
What I'd like: A route in the early boot config and apiclient for the elastic load balancer api. (Similar to Amazon EC2 - IMDSv1 HTTP API, but for the elastic load balancer api.) Here is a snippet from a user-data bash script coming from CloudFormation for another linux box that we are porting to bottlerocket:
It doesn't look like there is an equivalent aws agent for elbv2, so just a direct call to the AWS API could do it. (either the rest route or thru AWS CLI). Proposed way to do this in early boot config via the user-data toml file (going thru CloudFormation):
If there is a better way to imply And this does the a call to the api below (similar to the aws cli call above): Related to: Any alternatives you've considered: https://docs.aws.amazon.com/eks/latest/userguide/aws-load-balancer-controller.html |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thank you for opening your first Bottlerocket issue and providing links and context. The way we expect users to interact with things like the AWS CLI (or SDKs) would be via a container. In this case, it sounds like something that should happen early in the boot so we'd suggest using a bootstrap container that contains the desired logic. If you want to go this route, let us know if you need any assistance. |
Beta Was this translation helpful? Give feedback.
-
So we made progress on a workaround with a awscli+alpine image and using the In ECR we saved a new alpine image with the following:
Our new CloudFormation portion now looks like this:
Getting the The documentation in the comments at the top of this file was very helpful: Also note that the default version of awscli for alpine installs
And if you need AWS CLI v2, you need to install something like what is here: https://stackoverflow.com/a/65969295/999943 And then you would get:
Hope that helps someone in the future. |
Beta Was this translation helpful? Give feedback.
So we made progress on a workaround with a awscli+alpine image and using the
bootstrap-containers
setting. Here goes:In ECR we saved a new alpine image with the following:
Our new CloudFormation portion now looks like this: