NoSuchBucket error when running Kubernetes on AWS

不羁的心 提交于 2019-12-11 09:58:01

问题


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:


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.



来源:https://stackoverflow.com/questions/35664787/nosuchbucket-error-when-running-kubernetes-on-aws

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!