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

fix KOPS_AWS_ROLE_ARN assume behaviour #16568

Merged
merged 1 commit into from
May 13, 2024

Conversation

zetaab
Copy link
Member

@zetaab zetaab commented May 13, 2024

without this change we got error:

(we have KOPS_AWS_ROLE_ARN=arn:aws:iam::xx:role/yy env defined`

% ./kops export kubecfg --admin=87600h
Error: got an error while querying for valid regions (verify your AWS credentials?): operation error EC2: DescribeRegions, https response error StatusCode: 403, RequestID: bee08acb-624f-460d-9a9d-5da92325b6d1, api error UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::xx:user/xx is not authorized to perform: ec2:DescribeRegions because no identity-based policy allows the ec2:DescribeRegions action

after this change it works fine

% ./kops export kubecfg --admin=87600h     
kOps has set your kubectl context to yyy.k8s.local

@k8s-ci-robot k8s-ci-robot added the area/provider/aws Issues or PRs related to aws provider label May 13, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 13, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 13, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2024
@k8s-ci-robot k8s-ci-robot merged commit cbdc646 into kubernetes:master May 13, 2024
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone May 13, 2024
@zetaab zetaab deleted the fixawsauth branch May 13, 2024 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants