More Info:
Verifies the default namespace has no workloads so RBAC, quotas and NetworkPolicies can be scoped per tenant.Risk Level
MediumAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all workloads in the
defaultnamespace (run on any machine with kubectl access): -
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): -
Create the target namespace if it does not already exist:
-
Apply the modified manifests into the new namespace (run on any machine with kubectl access):
-
After confirming the workloads are running correctly in
NEWNAMESPACE, delete the old workloads fromdefault(run on any machine with kubectl access): -
Verification (run on any machine with kubectl access):
Using kubectl
Using kubectl
On any machine with kubectl access:Edit
- Identify workloads running in the
defaultnamespace
- For each workload type, export its manifest, modify the namespace, and re‑create it. Examples:
- Deployments:
default-deployments.yaml:- Remove
status:sections. - For every object, set
metadata.namespace: <new-namespace-name>(for exampleteam-a).
- StatefulSets:
- DaemonSets:
- Jobs/CronJobs:
- Services and related objects (to keep networking functioning):
- If needed, create the new namespace first:
- Verification
Automation
Automation

