Skip to main content

More Info:

Verifies the default namespace has no workloads so RBAC, quotas and NetworkPolicies can be scoped per tenant.

Risk Level

Medium

Address

Security

Compliance Standards

  • Cloudanix Best Practice

Triage and Remediation

Remediation

Manual Steps

  1. List all workloads in the default namespace (run on any machine with kubectl access):
  2. For each workload type in default, export its manifests so you can recreate them in a new namespace (replace NEWNAMESPACE with your chosen name, created beforehand if needed):
  3. Create the target namespace if it does not already exist:
  4. Apply the modified manifests into the new namespace (run on any machine with kubectl access):
  5. After confirming the workloads are running correctly in NEWNAMESPACE, delete the old workloads from default (run on any machine with kubectl access):
  6. Verification (run on any machine with kubectl access):
On any machine with kubectl access:
  1. Identify workloads running in the default namespace
  1. For each workload type, export its manifest, modify the namespace, and re‑create it. Examples:
  • Deployments:
Edit default-deployments.yaml:
  • Remove status: sections.
  • For every object, set metadata.namespace: <new-namespace-name> (for example team-a).
Then apply and delete originals:
  • StatefulSets:
  • DaemonSets:
  • Jobs/CronJobs:
  • Services and related objects (to keep networking functioning):
  1. If needed, create the new namespace first:
  1. Verification