π AWS EKS Cluster allows unrestricted public traffic π’
- Contextual name: π Cluster allows unrestricted public traffic π’
- ID:
/ce/ca/aws/eks/cluster-allows-unrestricted-public-traffic
- Located in: π AWS EKS
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Internal
dec-x-cffc7d8e
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-cffc7d8e | 1 |
Logicβ
- π§ prod.logic.yaml π’
- π AWS EKS Cluster
- π AWS EKS Cluster - object.extracts.yaml
- π§ͺ test-data.json
Descriptionβ
Descriptionβ
Ensure the AWS EKS Kubernetes API server endpoint is not exposed to unrestricted public access. This endpoint provides the interface to your clusterβs control plane; permitting open access allows any IP to initiate connections.
Rationalβ
Unrestricted public access expands your clusterβs attack surface. Threat actors could probe the API server for vulnerabilities, enumerate resources, or launch denial-of-service attacks.By limiting access to authorized CIDR ranges (e.g., corporate networks, VPN gateways, or designated CI/CD environments) you enforce the principle of least privilege and reduce the risk of unauthorized access and workloads compromise.
Impactβ
When specifying approved CIDR blocks, include all addresses from which your worker nodes and (if applicable) Fargate pods will access the public endpoint. Omitting any required range may prevent legitimate cluster operations.
Auditβ
This policy marks an AWS EKS Cluster as
INCOMPLIANT
whenEndpoint Public Access
is set to Enabled andPublic Access CIDRs
include 0.0.0.0/0... see more
Remediationβ
Remediationβ
From Command Lineβ
Execute the following command to restrict your EKS API server endpoint to approved CIDR ranges and enable private endpoint access.
{{publicAccessCidrs}}
is a single CIDR or comma-separated list. Note that CIDR blocks must exclude reserved addresses.If you rely solely on the public endpoint, you must include every egress IP used by your VPC (for example, the NAT Gatewayβs public IP) in
publicAccessCidrs
. Enabling the private endpoint simplifies traffic flow for internal components and reduces the need to enumerate VPC egress addresses.aws eks update-cluster-config \
--region {{region-code}} \
--name {{cluster-name}} \
--resources-vpc-config endpointPublicAccess=true,publicAccessCidrs="{{publicAccessCidrs}}",endpointPrivateAccess=true