Ensure that your Amazon Elastic Kubernetes Service (EKS) cluster nodes do not have public IP addresses assigned, so that they only have private IP addresses and are not directly accessible from the Internet. Private nodes are nodes with no public IP addresses. When cluster nodes are assigned public IP addresses, they become directly addressable from the Internet, increasing the attack surface and making it harder to secure the cluster. To ensure nodes are private, they should be deployed in private subnets that do not auto-assign public IP addresses, and launch templates should set AssociatePublicIpAddress to false. Additionally, the cluster's API server endpoint should be configured with private access enabled and public access disabled or restricted to specific trusted CIDR blocks. Enabling private nodes is a recommended control required by CIS Amazon EKS Benchmark v1.8.0 (5.4.3).
Disabling public IP addresses on cluster nodes restricts access to only internal networks, forcing attackers to obtain local network access before attempting to compromise the underlying Kubernetes hosts. When nodes have public IPs, each IP can serve as a potential entry point for attackers, making it easier to exploit vulnerabilities or move laterally within the cluster. By using private nodes, all inbound traffic must pass through controlled entry points such as load balancers, bastion hosts, or VPN connections, significantly improving the security posture of the Kubernetes cluster.
Private nodes do not have outbound access to the public internet. If you want to provide outbound Internet access for your private nodes, you can use a NAT Gateway or manage your own NAT instance. Ensure that alternative access methods are in place before removing public IP addresses from existing nodes. Additionally, the cluster must be configured with a private API server endpoint and IP Aliasing enabled for private nodes to function correctly.
Audit
To determine if your Amazon EKS cluster nodes are created with private nodes (i.e., no public IP addresses assigned), perform the following actions:
Remediation / Resolution
To ensure your Amazon EKS cluster nodes are created with private nodes (no public IP addresses), you must configure the cluster API server endpoint for private access and deploy node groups in private subnets without public IP auto-assignment. Perform the following actions:
Transitioning to private nodes requires careful planning. Ensure a NAT Gateway or NAT instance is configured for outbound internet access from private subnets. Verify that all required services are accessible via VPC endpoints or private connections. Test connectivity before migrating production workloads. Existing node groups may need to be replaced with new node groups that use private subnets, as subnet configurations cannot be modified after node group creation.References
- AWS Documentation
- Amazon EKS FAQs
- Amazon EKS clusters
- Amazon EKS cluster endpoint access control
- Create a managed node group for your cluster
- Customize managed nodes with launch templates
- AWS Command Line Interface (CLI) Documentation
- list-clusters
- describe-cluster
- update-cluster-config
- list-nodegroups
- describe-nodegroup
- create-nodegroup
- delete-nodegroup
- describe-update
- describe-subnets
- describe-route-tables
- describe-launch-template-versions
- CIS Security Documentation
- Kubernetes