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
Cluster-Autoscaler should query AWS meta-data to determine AWS_REGION if not set #1208
Comments
This sounds similar to how it works on GCP. Would you be interested in contributing this? |
Tackles kubernetes#1208. EC2 Metadata helpfully supplies AWS Region info, so rather than _requiring_ an environment variable, this patch enables `aws_manager.go` to retrieve that information from EC2 itself. Example YAMLs no longer reference the vestigial `AWS_REGION` environment variable, but supplying it to `cluster-autoscaler` still relays it to the AWS SDK like before.
Tackles kubernetes#1208. EC2 Metadata helpfully supplies AWS Region info, so rather than _requiring_ an environment variable, this patch enables `aws_manager.go` to retrieve that information from EC2 itself. Example YAMLs no longer reference the vestigial `AWS_REGION` environment variable, but supplying it to `cluster-autoscaler` still relays it to the AWS SDK like before.
It looks like this already exists, no? https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/aws_manager.go#L70 I'm happy to contribute if you can confirm the need still exists and I'm missing something. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
This has been supported in v1.3.x and later released. Should be safe to close. |
/close |
@Jeffwan: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Tackles kubernetes#1208. EC2 Metadata helpfully supplies AWS Region info, so rather than _requiring_ an environment variable, this patch enables `aws_manager.go` to retrieve that information from EC2 itself. Example YAMLs no longer reference the vestigial `AWS_REGION` environment variable, but supplying it to `cluster-autoscaler` still relays it to the AWS SDK like before.
Tackles kubernetes#1208. EC2 Metadata helpfully supplies AWS Region info, so rather than _requiring_ an environment variable, this patch enables `aws_manager.go` to retrieve that information from EC2 itself. Example YAMLs no longer reference the vestigial `AWS_REGION` environment variable, but supplying it to `cluster-autoscaler` still relays it to the AWS SDK like before.
Tackles kubernetes#1208. EC2 Metadata helpfully supplies AWS Region info, so rather than _requiring_ an environment variable, this patch enables `aws_manager.go` to retrieve that information from EC2 itself. Example YAMLs no longer reference the vestigial `AWS_REGION` environment variable, but supplying it to `cluster-autoscaler` still relays it to the AWS SDK like before.
Tackles kubernetes#1208. EC2 Metadata helpfully supplies AWS Region info, so rather than _requiring_ an environment variable, this patch enables `aws_manager.go` to retrieve that information from EC2 itself. Example YAMLs no longer reference the vestigial `AWS_REGION` environment variable, but supplying it to `cluster-autoscaler` still relays it to the AWS SDK like before.
Tackles kubernetes#1208. EC2 Metadata helpfully supplies AWS Region info, so rather than _requiring_ an environment variable, this patch enables `aws_manager.go` to retrieve that information from EC2 itself. Example YAMLs no longer reference the vestigial `AWS_REGION` environment variable, but supplying it to `cluster-autoscaler` still relays it to the AWS SDK like before.
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
Currently, the cluster-autoscaler requires the AWS_REGION variable to be defined. Surely this can be done statically in the YAML or via some init container calling the meta-data service from AWS or even by using the downwardAPI at some point in the future (kubernetes/kubernetes#40610).
But with auto-discovery of the node ASG by tags and the whole scaling up and down depending on access to the AWS API anyways, why not use the ec2metadata (https://docs.aws.amazon.com/sdk-for-go/api/aws/ec2metadata/) to determine in which region we are running? Sure it should be possible to still configure this variable statically, but I believe this is then one less thing to configure when starting with cluster-autoscaling on AWS and allows the configuration to be even simpler, no matter in what region the Kubernetes Cluster lives ...
The text was updated successfully, but these errors were encountered: