Ensure that the default Kubernetes namespace is not used for your Oracle Cloud Infrastructure (OCI) Kubernetes Engine (OKE) clusters. Objects deployed there are difficult to segregate and control, which complicates the application of Role-Based Access Control (RBAC) and other security policies, making resource management and segregation harder.
The default Kubernetes namespace should be avoided for all production workloads. Resources within the OKE cluster should be segregated by dedicated namespaces to effectively apply Role-Based Access Control (RBAC) and other security controls, simplifying both resource management and operational separation.
Audit
To determine if the default Kubernetes namespace is used , perform the following operations:
Remediation / Resolution
Ensure that namespaces are created to allow for appropriate segregation of Kubernetes resources. All new resources must be created in a specific namespace. To create new namespaces for your Kubernetes resources, 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
- About Access Control and Kubernetes Engine (OKE)
- Oracle Cloud Infrastructure CLI Documentation
- compartment list
- cluster list
- cluster create-kubeconfig
- Kubernetes Documentation
- Namespaces
- kubectl create namespace