Skip to main content

More Info:

Namespaces provide administrative and access-control boundaries between groups of resources. Create namespaces to segregate resources and place new resources in a specific namespace.

Risk Level

Low

Address

Security

Compliance Standards

  • CIS OKE

Triage and Remediation

Remediation

Manual Steps

  1. Inventory current namespaces and their workloads
    Run on any machine with kubectl access:
    Review whether business-critical applications, shared infrastructure, and testing workloads are clearly separated into different namespaces instead of using default.
  2. Identify workloads in the default namespace or other catch‑all namespaces
    If you have any custom workloads in default (or a single large shared namespace), decide how they should be grouped (e.g., by application, environment such as dev/stage/prod, or team/tenant).
  3. Design the namespace model and create required namespaces
    Decide and document which namespaces you need (for example: app1-prod, app1-dev, shared-infra, team-a, team-b).
    Create them:
  4. Plan and apply resource re-homing into the new namespaces
    For each workload currently in default (or another overly broad namespace), export and adjust its manifests:
    Edit my-deployment.yaml to set:
    Then re-apply in the target namespace and delete the old resource if needed:
    Repeat for Services, ConfigMaps, Secrets, Jobs, etc., as appropriate, verifying dependencies (e.g., Service selectors, config references).
  5. Align access control and policies with the new namespaces
    For each new namespace, ensure RBAC and policies match the intended boundary:
    Create or adjust Role, RoleBinding, NetworkPolicy, ResourceQuota, and LimitRange objects so that teams/apps can only access their own namespaces and appropriate resource limits are enforced.
  6. Verify namespace-based separation is in effect
    Confirm that application workloads now reside in their intended namespaces and that default contains no (or only minimal/expected) workloads:
    Review that resources are grouped according to your designed boundaries and that cross-namespace access (via RBAC and policies) matches your administrative intent.
Review guidance:
  • Potential problem if you see only the default/system namespaces (default, kube-system, kube-public, kube-node-lease, any cloud-provider system namespaces) and no application- or team-specific namespaces.
  • Also a problem if there is a single custom namespace that appears to host all workloads, suggesting no meaningful separation.
Review guidance:
  • Potential problem if most or all non-system workloads are in the default namespace.
  • Potential problem if unrelated applications (different teams, environments, or sensitivity levels) all run in the same namespace.
Review guidance:
  • Look for patterns like:
    • All Deployments in default.
    • Shared namespaces mixing dev/test/prod or internal/external workloads.
  • This suggests missing administrative boundaries.
Review guidance:
  • If access control is mostly via ClusterRoleBinding to wide roles (e.g., cluster-admin) and there are few or no namespace-scoped Role/RoleBinding objects, namespaces are likely not being used as effective boundaries.
  • If a single namespace’s roles grant broad access to many unrelated resources, it may indicate poor separation.
Review guidance:
  • If the vast majority of non-system pods are in the default namespace (or a single shared namespace), administrative boundaries are likely inadequate.
Verification guidance:
  • You should see multiple, clearly named namespaces (e.g., per environment, team, or application).
  • Non-system workloads should be spread across those namespaces in a way that matches your intended administrative and access-control boundaries.
Explanation of what indicates a potential problem:
  • Many application Pods/Deployments/Services appear in the default namespace (section 4 and summary section 7), especially if used by multiple teams or environments.
  • Critical, unrelated applications share the same namespace (check section 2 and 3 for “crowded” namespaces mixing different systems or teams).
  • Broad ClusterRoles and ClusterRoleBindings in section 5 show many subjects (users, groups, service accounts) bound to powerful roles, effectively bypassing namespace isolation.
  • Namespaces with workloads but few or no Roles/RoleBindings (section 6) may lack fine-grained, namespace-scoped RBAC.
Use this report to decide where to:
  • Create additional namespaces to separate teams, environments (dev/test/prod), or applications.
  • Move workloads out of default into specific namespaces.
  • Tighten RBAC so access is appropriately constrained per namespace.