Kubernetes creation in AWS - ap-northeast-2 region throws error "Please specify AWS_IMAGE directly (region not recognized)"

7/4/2016

Creating Kubernetes cluster in AWS cloud ap-northeast-2 region is throwing "Please specify AWS_IMAGE directly (region not recognized)" message.

Tried by setting the zone "export KUBE_AWS_ZONE="ap-northeast-2a"". But still fails to create.

[root@ip-172-31-29-160 cluster]# export KUBE_AWS_ZONE="ap-northeast-2a"
[root@ip-172-31-29-160 cluster]# ./kube-up.sh
*********************************************************
ZONE: ap-northeast-2a
REGION: ap-northeast-2
*********************************************************
... Starting cluster using provider: aws
... calling verify-prereqs
... calling kube-up
Starting cluster using os distro: vivid
Please specify AWS_IMAGE directly (region not recognized)
[root@ip-172-31-29-160 cluster]#

kubernetes/cluster/aws/config-default.sh

ZONE=${KUBE_AWS_ZONE:-ap-northeast-2a}
MASTER_SIZE=${MASTER_SIZE:-t2.large}
MINION_SIZE=${MINION_SIZE:-t2.large}
NUM_MINIONS=${NUM_MINIONS:-1}
-- Prakash26790
amazon-web-services
docker
kubernetes
kubernetes-health-check

2 Answers

7/4/2016

ap-northeast-2a is a zone not a region, the region id for Asia Pacific (Seoul) is ap-northeast-2. In order to specify the region, you need to set AWS_S3_REGION variable:

export AWS_S3_REGION=ap-northeast-2

Kubernetes guide for AWS: http://kubernetes.io/docs/getting-started-guides/aws/

Each region has multiple, isolated locations known as Availability Zones. Amazon EC2 provides you the ability to place resources, such as instances, and data in multiple locations. Resources aren't replicated across regions unless you do so specifically.

More detail about regions and availability zones: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html

-- ar-ms
Source: StackOverflow

7/14/2016

Finally, I found this problem myself.....

Kubernetes creation in some AWS regions throwing error “Please specify AWS_IMAGE directly (region not recognized)”

Because some regions are not recognized by Kubernetes, so manually we need to export the image name.

export AWS_IMAGE=ami-a39oi23
-- Prakash26790
Source: StackOverflow