EKS Security Groups
What You'll Learn
You'll understand how EKS uses three types of security groups to control network traffic at different levels of your cluster architecture.
The Three Layers of Network Control
In EKS, security groups act like bouncers at different doors of your cluster, each controlling who can enter at their specific level.
Cluster Security Group
When you create an EKS cluster, AWS automatically creates a cluster security group. This security group allows communication between the control plane (managed by AWS) and your worker nodes. Think of it as the "internal communication channel" that lets the Kubernetes API server talk to kubelets on your nodes, and vice versa. You typically don't modify this one—AWS manages it for you.
Node Security Groups
These security groups are attached to the EC2 instances that serve as your worker nodes. They control what traffic can reach your nodes from outside the cluster and between nodes themselves. For example, you might configure node security groups to allow SSH access from a bastion host or permit load balancer health checks. This is where you define rules for node-level network access.
Pod Security Groups
Introduced with the VPC CNI plugin, pod security groups allow you to assign security groups directly to individual pods using SecurityGroupPolicy resources. This provides granular, pod-level network isolation instead of relying solely on node-level rules. For instance, a database pod can have stricter ingress rules than a web frontend pod, even when running on the same node.
Why This Matters
Each layer serves a specific purpose: cluster security groups handle control plane communication, node security groups protect your infrastructure, and pod security groups enable application-level network segmentation.
Key Takeaway: EKS uses three security group layers—cluster, node, and pod—to provide defense-in-depth network isolation from infrastructure to application level.