简体   繁体   中英

aws kops create cluster errors out as InvalidClientTokenId

I am actually trying to deploy my application using Kubernetes in the AWS Kops. For this i followed the steps given in the AWS workshop tutorial.

https://github.com/aws-samples/aws-workshop-for-kubernetes/tree/master/01-path-basics/101-start-here

I created a AWS Cloud9 environment by logging in as a IAM user and installed kops and other required software's as well. When i try to create the cluster using the following command

kops create cluster --name cs.cluster.k8s.local --zones $AWS_AVAILABILITY_ZONES --yes

i get an error like below in the cloud9 IDE

error running tasks: deadline exceeded executing task IAMRole/nodes.cs.cluster.k8s.local. Example error: error creating IAMRole: InvalidClientTokenId: The security token included in the request is invalid
        status code: 403, request id: 30fe2a97-0fc4-11e8-8c48-0f8441e73bc3

I am not able to find a way to solve this issue. Any help on this would be appreciable.

I found the issue and fixed it. Actually I did not export the following 2 environment variables in the terminal where I am running create cluster. These 2 below variables are required while creating a cluster using kops

export AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id) export AWS_SECRET_ACCESS_KEY=$(aws configure get aws_secret_access_key)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM