Kops: error reading cluster configuration, error reading s3://name/domain/config: Could not retrieve location for AWS bucket

Created on 3 Apr 2017  路  6Comments  路  Source: kubernetes/kops

Is there some steps that I am missing or am I running into a bug?

kops version
Version 1.5.3 (git-46364f6)
#aws s3 mb s3://test_test_test_test
make_bucket: test_test_test_test

aws s3api list-buckets --query 'Buckets[].Name' | grep test_test_test_test
    "test_test_test_test", 

#kops create cluster --zones us-east-1a --name test.net -v 3 --state s3://test_test_test_test
I0402 20:48:04.178011   25878 s3context.go:143] Querying S3 for bucket location for test_test_test_test

error reading cluster configuration "test.net": error reading s3://test_test_test_test/test.net/config: Could not retrieve location for AWS bucket test_test_test_test

Most helpful comment

Ok I figured it; solution is to explicitly export AWS_ACCESS_KEY_ID & AWS_ACCESS_KEY_ID.

(Since I have multiple profiles; I used export AWS_PROFILE for aws cli but it is not enough for kops)

All 6 comments

The code here gets the bucket location. As mentioned in the comments you need to be the bucket owner.
Seems the user executing kops will also need to have permissions to execute GetBucketLocation and EC2::DescribeRegions.

See https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html for more details on the request.

I created & listed the bucket prior to running 'kops create cluster'. I actually just tried using go-sdk and was able to list the s3 bucket.

(I do have multiple aws profile; not sure if that makes any difference)

It does. Try using putting AWS_PROFILE before the command like AWS_PROFILE=xxx kops ...

I probably didn't word it correctly but I meant if have multiple profiles somehow mess up kops (seem unlikely) but I was already in the right profile.

Ok I figured it; solution is to explicitly export AWS_ACCESS_KEY_ID & AWS_ACCESS_KEY_ID.

(Since I have multiple profiles; I used export AWS_PROFILE for aws cli but it is not enough for kops)

Ok I figured it; solution is to explicitly export AWS_ACCESS_KEY_ID & AWS_ACCESS_KEY_ID.

(Since I have multiple profiles; I used export AWS_PROFILE for aws cli but it is not enough for kops)

I used aws configure I then entered my AWS Access Key and Secret Access Key and voila, kops worked!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olalonde picture olalonde  路  4Comments

chrislovecnm picture chrislovecnm  路  3Comments

mikejoh picture mikejoh  路  3Comments

justinsb picture justinsb  路  4Comments

minasys picture minasys  路  3Comments