Search code examples
amazon-web-servicesdockerkuberneteskubernetes-health-check

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


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}

Solution

  • 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