NoSuchBucket error when running Kubernetes on AWS

2019-08-15 05:51发布

Downloaded Kubernetes 1.1.8 from:

https://github.com/kubernetes/kubernetes/releases/download/v1.1.8/kubernetes.tar.gz

Followed the instructions at:

https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/aws.md

And got the following error:

kubernetes-1.1.8 > ./kubernetes/cluster/kube-up.sh 
... Starting cluster using provider: aws
... calling verify-prereqs
... calling kube-up
Starting cluster using os distro: vivid
Uploading to Amazon S3
Creating kubernetes-staging-0eaf81fbc51209dd47c13b6d8b424149
make_bucket: s3://kubernetes-staging-0eaf81fbc51209dd47c13b6d8b424149/

A client error (NoSuchBucket) occurred when calling the GetBucketLocation operation: The specified bucket does not exist
+++ Staging server tars to S3 Storage: kubernetes-staging-0eaf81fbc51209dd47c13b6d8b424149/devel
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument --region: expected one argument

AWS Console showed that the bucket was created but was empty.

1条回答
干净又极端
2楼-- · 2019-08-15 06:26

It's probably a region issue; I'm guessing that the bucket is created in another region than Kubernetes tries to access. Looks like the aws cmdline tool is confused about the region: aws: error: argument --region: expected one argument

When it can't determine the region, it defaults to one of the us regions.

EDIT: the S3 sync is triggered by script cluster/aws/util.sh. The command executed is aws s3 sync --region ${s3_bucket_location} --exact-timestamps ${local_dir} "s3://${AWS_S3_BUCKET}/${staging_path}/".

You can add an echo ${s3_bucket_location} before the line above. It should give you more information on what the region is set to.

查看更多
登录 后发表回答