How to resolve this error on a Kubernetes Installation on AWS?

7/7/2016

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..

-- CJChalmers
amazon-web-services
kubeadm
kubernetes

2 Answers

7/25/2016

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
Source: StackOverflow

10/25/2016

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
Source: StackOverflow