Ensure that Kubernetes namespaces have network policies defined to explicitly govern pod-to-pod communication, allowing you to precisely control internal traffic, and ultimately achieve necessary isolation within your OCI Kubernetes Engine (OKE) cluster network.
Network policies provide necessary segmentation, ensuring containers communicate only as intended. These policies define explicit allowed communication paths for selected pods. Significantly, adding a policy to a namespace immediately denies all traffic not explicitly permitted, while having no policies means all traffic remains completely allowed.
Audit
To determine if your Kubernetes namespaces have network policies defined to control traffic, perform the following operations:
Remediation / Resolution
To ensure that each user-workload Kubernetes namespace defined in your OKE cluster has at least one network policy, perform the following operations:
References
- Oracle Cloud Infrastructure Documentation
- Overview of Kubernetes Engine (OKE)
- Managing Kubernetes Clusters
- Setting Up Cluster Access
- Accessing a Cluster Using Kubectl
- Oracle Cloud Infrastructure CLI Documentation
- compartment list
- cluster list
- cluster create-kubeconfig
- Kubernetes Documentation
- Namespaces
- Network Policies