More Info:
Use namespaces to isolate your Kubernetes objects.Risk Level
LowAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CIS EKS
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Inventory existing namespaces and workloads
- Run on: any machine with kubectl access
- Command:
- Purpose: Understand what namespaces exist and which workloads currently run in each (especially in
default,kube-system, and other shared namespaces).
-
Identify workloads in inappropriate/shared namespaces
- Run on: any machine with kubectl access
- Commands (focus on
defaultand other “catch-all” namespaces): - Purpose: Detect application components that are mixed together without clear separation (e.g., multiple teams, environments, or apps sharing
default).
-
Define intended administrative boundaries
- Manual decision step (no command):
- Decide how you want to separate resources, for example:
- By environment:
dev,stage,prod - By team:
team-a,team-b - By application or domain:
payments,analytics, etc.
- By environment:
- Document a simple mapping: “Team/Environment/App → Namespace name”.
- Decide how you want to separate resources, for example:
- Manual decision step (no command):
-
Create or validate namespaces for each boundary
- Run on: any machine with kubectl access
- For each needed namespace
NAMESPACE_NAME, if it does not exist: - Purpose: Ensure there is a dedicated namespace for each intended administrative boundary.
-
Plan and migrate workloads into appropriate namespaces
- Run on: any machine with kubectl access
- For each deployment/statefulset/etc. currently in a shared or inappropriate namespace:
- Export its manifest:
- Edit the manifest file to set:
and adjust any namespace-scoped references (ConfigMaps, Secrets, ServiceAccounts, etc.).
- Apply it to the target namespace:
- Delete the old resource from the original namespace after confirming it’s running correctly in the new one:
- Export its manifest:
- Repeat similarly for other resource kinds (Services, Jobs, CronJobs, ConfigMaps, Secrets, etc.), ensuring dependencies move together.
-
Verify namespace-based separation is in place
- Run on: any machine with kubectl access
- Commands:
- Check that:
- Application components are grouped in their intended dedicated namespaces.
- The
defaultnamespace and other shared namespaces no longer contain unrelated or multi-tenant workloads.
Using kubectl
Using kubectl
- Only
default,kube-system,kube-public,kube-node-lease, and maybe one large custom namespace in use. - Many unrelated workloads (dev, test, prod, infra, third-party) all end up in
defaultor a single shared namespace.
- Business apps, CI/CD tools, monitoring, logging, and system components all mixed in the same namespace (especially
default). - No clear separation by environment (e.g., dev/test/prod) or team/application.
- Multiple teams or applications (seen in labels like
app=,team=,environment=) colocated in the same namespace without a clear reason. - Lack of consistent labeling that would indicate intentional grouping within namespaces.
- Very broad permissions in shared namespaces (e.g., roles that can manage “everything”) used by multiple teams or apps.
- Critical infra or security-sensitive workloads in the same namespace as less-trusted or experimental workloads.
- “Catch‑all” namespaces with a mix of:
- Different applications
- Different environments (e.g., dev and prod together)
- Shared secrets or configmaps used by unrelated workloads
- Absence of
NetworkPolicyin a namespace that hosts mixed or sensitive workloads.
- Users, groups, or service accounts with cluster‑wide admin permissions (
cluster-adminor similar) that make namespace separation less effective. - Service accounts that belong to “low trust” workloads being bound at cluster scope instead of namespace scope.
- A very high object count in
defaultor a single namespace, with few or no other active namespaces. - Namespaces used only for one or two small workloads vs huge “everything” namespaces without a clear policy.
Automation
Automation

