Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while creating config map #33

Closed
rahulrajm opened this issue Feb 3, 2021 · 11 comments · Fixed by #64 · May be fixed by container-demo/hello-telepresence-for-docker-old#9
Closed

Getting error while creating config map #33

rahulrajm opened this issue Feb 3, 2021 · 11 comments · Fixed by #64 · May be fixed by container-demo/hello-telepresence-for-docker-old#9

Comments

@rahulrajm
Copy link

terraform version 0.14
Getting Error: Unauthorized while creating config map. Please fix

@im2nguyen
Copy link
Collaborator

@rahulrajm
Copy link
Author

rahulrajm commented Feb 3, 2021 via email

@im2nguyen
Copy link
Collaborator

Can you try following the instructions for You're the cluster creator

@rahulrajm
Copy link
Author

rahulrajm commented Feb 4, 2021 via email

@im2nguyen
Copy link
Collaborator

I haven't been able to replicate it, can you provide more information and the full error message?

@rahulrajm
Copy link
Author

rahulrajm commented Feb 4, 2021 via email

@mijhael3000
Copy link

terraform version 0.14
Getting Error: Unauthorized while creating config map. Please fix

I solved this changing in my .aws/config file the region from us-west-2 to us-east-2

$ cat ~/.aws/config
[default]
region = us-east-2

@rahulrajm
Copy link
Author

@mijhael3000 After making the changes also, getting same error

@im2nguyen
Copy link
Collaborator

Can you create an issue in the terraform-aws-eks module repo? They should be able to help you

@siozosdr
Copy link

siozosdr commented Mar 12, 2021

I'm getting the same error as well:

module.eks.kubernetes_config_map.aws_auth[0]: Creating...

Error: Unauthorized

I'm testing with cluster_version="1.19" instead of "1.18" but I don't think that it should matter.
Rest of the resources have been created successfully but not the config_map. If I try to access the EKS cluster from the AWS console I get the message:

Your current user or role does not have access to Kubernetes objects on this EKS cluster
This may be due to the current user or role not having Kubernetes RBAC permissions to describe cluster resources or not having an entry in the cluster’s auth config map

The AWS documentation only has to do with after creating the cluster which is NOT the case for me as well.
I'm deploying the resources with an iam role that has eks:* permissions on '*'

EDIT: This is happening because I'm deploying the cluster with a specific terraform role. If I deploy the cluster with the Admin user then I can access the cluster from the console as well as get the config_map to be created.

The docs should be more explicit about use cases like this

@alanszlosek
Copy link
Contributor

This should now be fixed by #64 and #65. Please let us know if you are still having issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants