0

I'm trying to install Kubernetes (first time) on AWS according to this tutorial http://kubernetes.io/docs/getting-started-guides/aws/#prerequisites

I can use the AWS CLI but after running the following command:

export KUBERNETES_PROVIDER=aws; curl -sS https://get.k8s.io | bash

Then I get this error:

Unpacking kubernetes release v1.3.0
Creating a kubernetes on aws...
... Starting cluster in us-west-2a using provider aws
... calling verify-prereqs
... calling kube-up
Starting cluster using os distro: jessie
usage: aws [options] <command> <subcommand> [parameters]
aws: error: argument subcommand: Invalid choice, valid choices are:

list
Uploading to Amazon S3
+++ Staging server tars to S3 Storage: kubernetes-staging-a9b7435c8fc7b6c3d3e26fdd5b84aaae/devel
usage: aws [options] <command> <subcommand> [parameters]
aws: error: argument --region: expected one argument

any help/insight appreciated..

CryogenicNeo
  • 937
  • 12
  • 25
CJChalmers
  • 139
  • 5
  • seems like you are missing region. Try adding your region `KUBERNETES_PROVIDER=aws; KUBE_AWS_ZONE=us-east-1a; curl -sS https://get.k8s.io | bash` – Ayon Nahiyan Oct 27 '16 at 09:25

2 Answers2

2

I had the same issue; it turned out I had pip install aws not pip install awscli. After uninstalling aws and installing awscli I was good to go.

Joshua Hansen
  • 356
  • 4
  • 7
1

Seems region is missing from environment vars.

Below example is env vars for Singapore region

export KUBE_AWS_ZONE=ap-southeast-1a
export NUM_NODES=2
export MASTER_SIZE=t2.micro
export NODE_SIZE=t2.micro
export AWS_S3_REGION=ap-southeast-1
export AWS_S3_BUCKET=mudrii-kubernetes-artifacts
export KUBE_AWS_INSTANCE_PREFIX=k8s
mudrii
  • 689
  • 6
  • 4