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 Deployment/StatefulSet/DaemonSet/Job/CronJob in
default, export its manifest to a file and edit the namespace (run on any machine with kubectl access). Example for a Deployment namedmy-app:Editmy-app.yamland change:to:Ensuremy-tenant-namespaceexists: -
Apply the updated workload manifest in the new namespace (run on any machine with kubectl access):
-
Once you confirm the workload is Running in the new namespace, delete the old object from
default(run on any machine with kubectl access). Example: -
Repeat steps 2–4 for all remaining controllers and standalone Pods in
default. For a standalone Pod calledmy-pod: -
Verification (run on any machine with kubectl access):
Confirm
podCount=0andis_compliant=true.
Using kubectl
Using kubectl
On any machine with kubectl access:StatefulSets:DaemonSets:Jobs:CronJobs:ReplicaSets (if you have standalone ones you want to keep):Services, ConfigMaps, Secrets, and ServiceAccounts that belong with those workloads should also be moved:Services:ConfigMaps:Secrets (exclude built‑ins you don’t want to move, adjust selector as needed):ServiceAccounts (excluding the default one):(From a directory containing only the YAMLs you intend to move.)If you need more control, delete selected objects by name instead of
- Identify workloads currently in the
defaultnamespace
- For each workload type, export its manifest from
defaultand prepare it for a new namespace. Replacemy-namespacewith your target namespace name (which should already exist or be created ahead of time):
- Apply the generated manifests into the new namespace
- After confirming the workloads are running correctly in
my-namespace, delete them fromdefault.
--all.- Verification (from any machine with kubectl access)
Automation
Automation

