[EKS] [request]: EC2 "RunInstances" and "CreateNodegroup" API call failing when using a shared VPC
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
There is a limitation within EKS which doesn't allow us to create the Managed Node Group while using the shared VPC and results in the below error. Otherwise, it works well with non-shared VPC.
`You do not have access to a default security group in VPC . Specify a security group, and try again. (Service: AmazonEKS; Status Code: 400; Error Code: InvalidRequestException; Request ID: xxxxx; Proxy: null)`
**Which service(s) is this request for?**
EKS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
We are trying to create the managed node group using the CFN template in a shared VPC and we found the "RunInstances" API call is failing prior to "CreateNodegroup" API call.
MNG is trying to perform a dry-run EC2 "RunInstances" call to test whether the LaunchTemplate configuration is valid prior to creating the MNG LaunchTemplate, and it is returning the below EC2 API error:
```
Client.InvalidParameterCombination
You do not have access to a default security group in VPC . Specify a security group, and try again.
```
Looks like, dry-run call doesn't function correctly when the default SG is missing or otherwise unavailable in the CFN Template.
**Are you currently working around this issue?**
We are using different launch template for different environments and specifying the Security group in the Launch template.
**Additional context**
This is very important for us to maintain a single launch template across different environments and to be able to launch new accounts using VPC sharing.
Contributor guide
Research direction
No repository files, tests, or implementation entry points are named. Start by reviewing the EKS managed node group flow and the EC2 RunInstances dry-run behavior for shared VPCs; done means a managed node group can use the specified launch-template security group without requiring access to a default security group.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, kubernetes
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100