question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[aws-eks] The controllplane securitygroup of the cluster should be accessible outside the eks cluster construct

See original GitHub issue

Use Case

I am using custom networking with eks. For this, i have to allow access from the pod securitygroup to the controllplane securitygroup. Because i have to apply some manifests and patches too, i have to pass the eks cluster to my CustomNetworking cunstruct. Because i cannot access the securitygroup of the controllplane via the cluster construct, i have to create a new securitygroup for the controllplane (the same way the cluster construct would create it) and pass it to my CustomNetworking construct too.

Both steps, passing it separately and creating the securitygroup is unnecessary.

In addition: It is not possible to change se controllplane securitygroup after you created the cluster. So you have to recreate it to use your own securitygroup. Only because i want to add an ingress to the controllplane securitygroup.

Proposed Solution

change the following code

https://github.com/aws/aws-cdk/blob/55e6130503d2e7346eec81d01ef37098708d0196/packages/%40aws-cdk/aws-eks/lib/cluster.ts#L885

const securityGroup = props.securityGroup || new ec2.SecurityGroup(this, 'ControlPlaneSecurityGroup', {
   vpc: this.vpc,
   description: 'EKS Control Plane Security Group',
});

to

public abstract readonly controllPlaneSecurityGroup?: ec2.ISecurityGroup;
...

this.controllPlaneSecurityGroup = props.securityGroup || new ec2.SecurityGroup(this, 'ControlPlaneSecurityGroup', {
   vpc: this.vpc,
   description: 'EKS Control Plane Security Group',
});

...

resourcesVpcConfig: {
        securityGroupIds: [this.controllPlaneSecurityGroup.securityGroupId],
        subnetIds,
      },

i think there are no more references 

Other

I don’t think this will cause any problems and think i would be able to implement this

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
iliapolocommented, Dec 2, 2020

@markus7811 The controlPlaneSecurityGroups property will definitely be optional.

Since we don’t want to introduce breaking changes, we will deprecate securityGroup and likely validate that only one of controlPlaneSecurityGroups or securityGroup is used. For the same reason, I’m also leaning towards keeping the auto-creation in case none is specified.

We will be finalizing this soon.

0reactions
github-actions[bot]commented, Jun 28, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon EKS security group requirements and considerations
This topic describes the security group requirements of an Amazon EKS cluster. When you create a cluster, Amazon EKS creates a security group...
Read more >
Network Security - EKS Best Practices Guides
EKS uses AWS VPC Security Groups (SGs) to control the traffic between the Kubernetes control plane and the cluster's worker nodes. Security groups...
Read more >
AWS EKS cluster security group overly permissive to all traffic
Private access. Select whether to enable or disable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes ......
Read more >
Creating an EKS Cluster | Rancher Manager
Rancher needs access to your AWS account in order to provision and administer your Kubernetes clusters in Amazon EKS. You'll need to create...
Read more >
terraform-aws-eks ) module
Terraform module to create an Elastic Kubernetes (EKS) cluster and ... created security group IDs to attach to the cluster control plane ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found