Ensure that your Amazon Elastic Kubernetes Service (EKS) clusters are using network policies to implement secure policy-based access control in order to segment and isolate traffic. AWS provides two add-ons for enforcing network policies: Amazon VPC CNI plugin (default EKS CNI plugin) and Calico, an open-source network security solution founded by Tigera. Enabling support for network policies in Amazon EKS requires installing a CNI plugin that supports them.
A network policy is a Kubernetes resource that allows you to control the traffic between pods and services within a cluster. Network policies are useful for enforcing security policies, isolating applications, and debugging network connectivity issues. By default, pods are not isolated, meaning they accept traffic from any source. Isolation is achieved by applying a network policy to select pods. Once a network policy is in place for a namespace, specifying a particular pod, that pod will reject any connections not permitted by the applied network policy.
As an example, this guide demonstrates how to enable support for network policies for EKS clusters with the Amazon VPC CNI plugin (official AWS EKS add-on). The Amazon VPC CNI plugin supports network policies since version 1.14.0.
Audit
To determine if your Amazon EKS clusters are using network policies, perform the following operations:
Remediation / Resolution
To allow for secure network policies on your Amazon Elastic Kubernetes Service (EKS) clusters, you need to enable the Amazon VPC CNI plugin at the cluster level. To update your EKS cluster configuration, perform the following operations:
References
- AWS Documentation
- Amazon EKS FAQs
- Amazon EKS cluster lifecycle and configuration
- Manage networking add-ons for Amazon EKS clusters
- Assign IPs to Pods with the Amazon VPC CNI
- Create the Amazon VPC CNI (Amazon EKS add-on)
- Alternate CNI plugins for Amazon EKS clusters
- IAM roles for service accounts
- Assign IAM roles to Kubernetes service accounts
- Amazon EKS node IAM role
- AWS Command Line Interface (CLI) Documentation
- list-clusters
- describe-addon
- describe-addon-versions
- create-addon