-
Notifications
You must be signed in to change notification settings - Fork 47
Can not connect to private EKS cluster #32
Comments
Thanks for the report. It's very important to support this scenario. I will look into it in the next 1 or 2 days. related to aws/aws-cdk#7972 |
I have assigned a VPC to this lambda function, along with all subnets and a security group with all VPC access. Thanks for looking into it! |
Yes I noticed that. I will get it sorted and provide a working sample with required fix if any. |
Meanwhile, can you suggest a workaround, from a lambda function's perspective? |
Not at this moment. But I guess the Lambda function will need to share the same security group with the eks control plane. I'd try explore this way. |
Just added some notes in the README FYR |
Hey, thanks for the help. Yes, I was able to make it work using your guide. Although, the Lambda Role could not connect to my cluster. To solve this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::1234567890123:role/newrole"
}
]
}
aws eks update-kubeconfig --name "$1" --role-arn "$2" --kubeconfig /tmp/kubeconfig And added role arn:aws:iam::1234567890123:role/newrole. This made me connect. Still not sure why I had to assume a role. Thanks again, @pahud |
@shrivastavshubham34 your suggestion worked for me. In my case, the EKS worker nodes are in private subnet, the API server endpoint is public. Yet, I was also facing the same issue. Followed the suggestion mentioned by you, and it worked, |
I'm trying to access a private EKS cluster already deployed.
Following the readme instructions, I pulled the SARs, but was not sure how to use it.
So, I pulled the repo and had to build it manually based on the existing CDK application.
https://github.com/aws-samples/aws-lambda-layer-kubectl/blob/master/cdk/README.md
I made sure my handler function was using cluster_name as Environment but still I'm getting a time-out after 30 seconds and not sure how to debug this.
The text was updated successfully, but these errors were encountered: