Comments (8)
Config map access by the terraform user who makes the cluster is enabled by default, and in fact cannot be disabled. We explain in the README and in more detail in the Release Notes for v0.42.0 the various problems with authenticating to the Kubernetes cluster.
Most likely what happened to you is that Terraform got and cached the auth token from the data source, but it expired while it was in the cache and therefore authentication failed when you tried to apply the changes. With kube_exec_auth_enabled = true
you get a fresh token every time you run plan
or apply
.
from terraform-aws-eks-cluster.
@christoffer-eide thanks for sharing. That fixed my issue when I was trying to set
public_access_cidrs
.I have Public and Private endpoint set but I can only communicate via the Public endpoint. If I try to communicate with the Private endpoint (e.g. from a VM build in the same VPC like the EKS cluster) I get no response (I can resolve IP but no connectivity).
Any idea what could be wrong?
try to probe with telnet to confirm that you can reach TCP of that address, otherwise it could be just the routing tables issue (in VPC subnets) or security groups, can't think of anything else that might restrict it. unless the internal endpoint has additional mechanisms - could it restrict access over the network based on IAM role? I know it does for OpenSearch (happened when I was setting up logging earlier this year, so IAM role policy that allows access to service was mandatory, and it somehow controlled the actual networking access to the endpoint addresses, I have no idea how it works behind the scenes but it's dynamic based on IAM. Might be same with EKS then? )
from terraform-aws-eks-cluster.
Thanks @Dmitry1987, I have found out the issue. I didn't associate the default VPC SG and VPN CIDR via:
allowed_security_group_ids = [module.vpc.vpc_default_security_group_id]
allowed_cidr_blocks = [module.vpc.vpc_cidr_block]
from terraform-aws-eks-cluster.
Try setting kube_exec_auth_enabled = true
in your eks_cluster
module
from terraform-aws-eks-cluster.
thank you, will try that. but why does this setting cause the error, and what else happens when i disable the exec auth flag?
from terraform-aws-eks-cluster.
kube_exec_auth_enabled
just controls if the authentication token should be fetched from the terraform data source aws_eks_cluster_auth
, or by executing the command eks get-token
.
I've had problems in the past where the aws_eks_cluster_auth
didn't return a token when I tried to modify the cluster
from terraform-aws-eks-cluster.
@christoffer-eide thanks for sharing. That fixed my issue when I was trying to set public_access_cidrs
.
I have Public and Private endpoint set but I can only communicate via the Public endpoint. If I try to communicate with the Private endpoint (e.g. from a VM build in the same VPC like the EKS cluster) I get no response (I can resolve IP but no connectivity).
Any idea what could be wrong?
from terraform-aws-eks-cluster.
Config map access by the terraform user who makes the cluster is enabled by default, and in fact cannot be disabled. We explain in the README and in more detail in the Release Notes for v0.42.0 the various problems with authenticating to the Kubernetes cluster.
Most likely what happened to you is that Terraform got and cached the auth token from the data source, but it expired while it was in the cache and therefore authentication failed when you tried to apply the changes. With
kube_exec_auth_enabled = true
you get a fresh token every time you runplan
orapply
.
v3.0.0 kube_exec_auth_enabled = true
The problem still exists
from terraform-aws-eks-cluster.
Related Issues (20)
- Use new terraform resource kubernetes_config_map_v1_data for managing aws_auth data HOT 1
- add IAM policy to IAM role HOT 1
- Add log group encryption
- Unable to add additional iam roles to cluster HOT 8
- Issue with kubernetes provider configuration when doing destroy
- Favour eks_cluster_managed_security_group_id output in documentation, instead of security_group_id
- Broken links in readme page
- Rare edge case: Protect kubernetes_config_map from being destroyed HOT 7
- Save the cluster creator role HOT 2
- Addons race condition with a nodegroup
- Don't force naming to end with -cluster (attributes)
- cloudwatch log group: retention is going to never expire state even after giving particular number
- enable the ability to change the kubernetes API version from vars HOT 2
- Conflicting arguments with Kubernetes provider 2.21.0 HOT 3
- "aws-auth" is forbidden in the namespace "kube-system" HOT 4
- hashicorp/kubernetes provider v2.25.0 breaks "cloudposse/eks-cluster/aws" module HOT 2
- Support new `authentication_mode` config for eks_cluster HOT 2
- All internal resources are getting same name . For example KMS and EKS Cluster will have same name which is hard to differentiate HOT 4
- Expose cluster role name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-eks-cluster.