kops icon indicating copy to clipboard operation
kops copied to clipboard

kop create cluster - error populating configuration: error querying for valid AZs in "eu-west-3"

Open ChambreNoire opened this issue 7 years ago • 12 comments

1. kops version : Version 1.11.0 (git-2c2042465)

2. Kubernetes version : 1.13

3. Cloud provider : AWS

4. What commands did you run? What is the simplest way to reproduce this issue?

  • Created 'kops' IAM user with AdministratorAccess
  • Created 'kops-state-190215-1' S3 Bucket with region "EU Paris"
  • Configured k8s.awebster.fr subdomain NS
  • 'aws configure' with 'kops' secrets
  • 'kops create cluster --name=k8s.awebster.me --state=s3://kops-state-190215-1 --zones=eu-west-3a --node-count=2 --node-size=t2.micro --master-size=t2.micro --dns-zone=k8s.awebster.me --cloud aws'

5. What happened after the commands executed?

error populating configuration: error querying for valid AZs in "eu-west-3" - verify your AWS credentials. Error: AuthFailure: AWS was not able to validate the provided access credentials status code: 401, request id: 2d099ba7-e29b-4e2f-82f7-ff2119d9faf3

6. What did you expect to happen?

Expected the S3 bucket to be populated with the manifest etc.

9. Anything else do we need to know?

I tried adding the following s3 bucket policy to (as seen elsewhere online). No change.

{ "Version": "2012-10-17", "Id": "Policy1550240631316", "Statement": [ { "Sid": "Stmt1550240628884", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::809593411167:user/kops" }, "Action": "s3:GetBucketLocation", "Resource": "arn:aws:s3:::kops-state-190215-1" } ] }

ChambreNoire avatar Feb 15 '19 14:02 ChambreNoire

Having the same issue here, have you managed to solve it?

joaomlopes avatar Apr 26 '19 14:04 joaomlopes

Same here.

kops create cluster --zones=us-east-1c unnnnnn --state s3:/mmmmmm. 8596 create_cluster.go:480] Inferred --cloud=aws from zone "us-east-1c"

error populating configuration: error querying for valid AZs in "us-east-1" - verify your AWS credentials. Error: UnauthorizedOperation: You are not authorized to perform this operation.

aykutyararbas avatar May 25 '19 21:05 aykutyararbas

Same issue. Please help

bmoby avatar Aug 01 '19 16:08 bmoby

You need to add ec2 DescribeAvailabilityZones permission to your policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "DescribeAvailabilityZones", "Effect": "Allow", "Action": [ "ec2:DescribeAvailabilityZones" ], "Resource": "*" } ] }

fdmsantos avatar Aug 01 '19 16:08 fdmsantos

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale

fejta-bot avatar Oct 30 '19 16:10 fejta-bot

Check and adjust the date on the host running kops.

marcindulak avatar Nov 04 '19 11:11 marcindulak

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten

fejta-bot avatar Dec 04 '19 12:12 fejta-bot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

fejta-bot avatar Jan 03 '20 13:01 fejta-bot

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close

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.

k8s-ci-robot avatar Jan 03 '20 13:01 k8s-ci-robot

I'm always getting the same issue as you guys .. what's the found the solution please ?

ghassen1khalil avatar Jan 19 '20 15:01 ghassen1khalil

FWIW for anyone still facing this issue. I ended up upgrading the aws cli to v2, and it started working. Still not sure what the root cause is.

scallopboat avatar Aug 05 '20 22:08 scallopboat

hellow 2023 here,

Still got same issue here?

I solved this problem with changing Kops's Iam permssions with required iam permission writen at documentation Here

mftzk avatar May 23 '23 09:05 mftzk