在AWS上运行Kubernetes时出现NoSuchBucket错误

时间:2016-02-27 01:55:13

标签: amazon-web-services amazon kubernetes

下载Kubernetes 1.1.8

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

按照以下说明进行操作:

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

并收到以下错误:

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控制台显示存储桶已创建但为空。

1 个答案:

答案 0 :(得分:3)

这可能是一个地区问题;我猜这个桶是在Kubernetes试图访问的另一个区域创建的。 看起来aws cmdline工具对该区域感到困惑: aws: error: argument --region: expected one argument

如果无法确定区域,则默认为其中一个美国区域。

编辑:S3同步由脚本cluster/aws/util.sh触发。 执行的命令是aws s3 sync --region ${s3_bucket_location} --exact-timestamps ${local_dir} "s3://${AWS_S3_BUCKET}/${staging_path}/"

您可以在上一行之前添加echo ${s3_bucket_location}。它应该为您提供有关该区域设置的更多信息。