A new Kubernetes namespace is open by default: every pod can talk to every other pod, any workload can run without resource limits, and the default service account is ready to hand its token to anything scheduled there. Cluster hardening happens once, but namespaces are created every week, usually on request from a product team, and each one inherits whatever the onboarding process forgets. This template is the run sheet a platform team completes before handing a namespace to a tenant team: ownership and labels, RBAC bindings, Pod Security Admission labels, ResourceQuota and LimitRange, default deny NetworkPolicy, service accounts and secrets, and the evidence that proves each item. It is written for platform engineers, cluster administrators and the reviewers who approve tenant access. It assumes the cluster already meets a production baseline; for that, use the Kubernetes Security Checklist.
This is an independent guide from NHI Mgmt Group, based on the Kubernetes project's public documentation as of November 2026. It is not sponsored or reviewed by the Kubernetes project. Product features change, so confirm settings against the Kubernetes project's current documentation.
How to use this template
- Replace text in square brackets, such as [Organisation], [Platform team] and [team-name], with your own values.
- Complete one copy per namespace request. "Must" items block hand-over; "should" items need a recorded exception under section 9.
- An item is met only when its "Verify" check passes against the live namespace, not when a manifest has been merged.
- Keep every object in this checklist in Git and apply it through your GitOps or pipeline tooling, so section 6.1 to 6.7 become a reusable namespace bundle rather than hand work.
- For why each control matters, read the Kubernetes Security Guide and the Top 10 Kubernetes Security Risks.
1. Purpose
This checklist sets the minimum configuration every namespace at [Organisation] must have before a tenant team receives access, and the evidence required for each item. It applies the Kubernetes project's multi-tenancy guidance, RBAC good practices, Pod Security Standards, resource quota and network policy documentation to the namespace as the unit of isolation. The Kubernetes multi-tenancy guidance is clear that RBAC, quotas and network policies are what make sharing a cluster safe and fair; a namespace on its own is only a naming boundary.
2. Scope
- Every namespace created for an application, team or tenant on [Organisation] clusters, in every environment that holds production data, production credentials or a network path to production.
- Namespaces created by pipelines, operators or self-service portals as well as by hand.
- Out of scope: system namespaces (
kube-system,kube-public,kube-node-lease) and platform namespaces owned by [Platform team], which follow the cluster baseline. Tenant namespaces must not use thekube-prefix, which Kubernetes reserves for system namespaces.
3. Roles and responsibilities
| Role | Responsibility in onboarding |
|---|---|
| Requesting team lead | Names the namespace owner and on-call contact, lists workloads, data classification, required ingress and egress, and the identities that need access. |
| [Platform team] | Creates the namespace from the approved bundle, applies sections 6.1 to 6.7, runs the verification checks and records evidence. |
| Security reviewer | Approves any "must" exception, any binding to a powerful ClusterRole and any Pod Security level below baseline. |
| Namespace owner | Keeps the access list current, answers quarterly access reviews and requests decommissioning when the namespace is no longer needed. |
4. Definitions
- Tenant: the team or application that receives a namespace. Map one tenant to one or more namespaces, never several tenants to one namespace.
- Namespace bundle: the versioned set of manifests (Namespace, RoleBindings, ResourceQuota, LimitRange, NetworkPolicies, ServiceAccounts) applied at creation.
- Pod Security Admission (PSA): the built-in admission controller that applies the Pod Security Standards levels
privileged,baselineandrestrictedper namespace through labels.
5. Pre-onboarding intake
Do not create the namespace until the request answers these questions. They decide the values used in section 6.
- Who is the accountable owner, and which group (from the identity provider, not individual users) needs access, at what level?
- What data classification will workloads handle, and does any workload need privileges that the
restrictedlevel forbids? - What CPU, memory, storage, GPU and object counts does the team expect at peak, and does it need Services of type
LoadBalancerorNodePort? - Which other namespaces and external endpoints must workloads reach, and who must reach them?
- Which workloads call the Kubernetes API, and which need cloud or external credentials?
- When will the namespace be reviewed or retired (project end date, environment lifetime)?
6. Onboarding checklist
6.1 Namespace object, ownership and labels
| ID | Requirement | Level | Verify |
|---|---|---|---|
| 6.1.1 | Namespace name follows [naming convention], is not default and does not start with kube-. | Must | Name check in the pipeline. |
| 6.1.2 | Labels for owner, cost centre, environment and data classification are set, plus the PSA labels in 6.3. | Must | Labels present on the Namespace object. |
| 6.1.3 | Tenants cannot patch their own Namespace object. Kubernetes RBAC guidance warns that a user who can patch a namespace can change its labels, loosening Pod Security Admission or matching network policies that select on labels. | Must | Impersonation check: the tenant group cannot patch or update namespaces. |
| 6.1.4 | Network policies that select namespaces use the control plane's immutable kubernetes.io/metadata.name label or labels only the platform can set. | Should | Review of selectors in 6.5. |
6.2 RBAC and access
| ID | Requirement | Level | Verify |
|---|---|---|---|
| 6.2.1 | Access is granted with RoleBindings in this namespace, not ClusterRoleBindings. A RoleBinding may reference a shared ClusterRole such as view or edit and still grants rights only in the namespace. | Must | No new ClusterRoleBinding names the tenant group. |
| 6.2.2 | Subjects are identity provider groups, not individual users, so leavers lose access when the group changes. | Must | Binding subjects are of kind Group (or ServiceAccount for automation). |
| 6.2.3 | No wildcard (*) verbs, resources or API groups in tenant Roles. Kubernetes notes wildcards also grant rights to resource types added in future. | Must | Policy check on Role manifests. |
| 6.2.4 | Tenant roles exclude the escalate, bind and impersonate verbs and write access to roles and rolebindings, unless a security reviewer approves delegated administration. | Must | Role review. |
| 6.2.5 | Who can create workloads is treated as who can read secrets: Kubernetes states that permission to create pods or workload resources implicitly grants access to Secrets, ConfigMaps and volumes in the namespace and to the API rights of any service account there. | Must | Workload-create rights limited to the deploy pipeline identity and named engineering groups. |
| 6.2.6 | get, list and watch on secrets are granted only where needed; Kubernetes notes that list and watch also reveal secret contents. | Must | Role review. |
| 6.2.7 | Production namespaces give humans read-only access by default, with write through the pipeline or a just-in-time elevation. | Should | Binding list matches the access model. |
Verify with impersonation, for example kubectl auth can-i --list --as-group=[tenant-group] --as=[test-user] -n [team-name], and record the output. For cluster-wide grants that could reach the new namespace, see How to audit Kubernetes cluster admin bindings and the Kubernetes RBAC Guide.
6.3 Pod Security Admission labels
| ID | Requirement | Level | Verify |
|---|---|---|---|
| 6.3.1 | pod-security.kubernetes.io/enforce is set to restricted, or to baseline with a recorded reason. privileged requires a security reviewer exception. | Must | Namespace labels. |
| 6.3.2 | pod-security.kubernetes.io/audit and pod-security.kubernetes.io/warn are set to restricted, so violations appear as audit annotations and user warnings even where enforce is baseline. | Must | Namespace labels. |
| 6.3.3 | Version labels (pod-security.kubernetes.io/enforce-version and the audit and warn equivalents) are pinned to a Kubernetes minor version or set to latest by a deliberate platform decision. | Should | Namespace labels match the platform standard. |
| 6.3.4 | Before tightening an existing namespace, the change is evaluated with kubectl label --dry-run=server --overwrite, which reports how existing pods would fare without changing the policy. | Must (changes) | Dry-run output attached to the change. |
PSA exemptions are cluster-wide admission configuration, not namespace settings; keep them out of tenant requests. For extra rules that PSA cannot express (image registries, required labels), use the platform's admission policies described in the Kubernetes Admission Control Guide.
6.4 ResourceQuota and LimitRange
| ID | Requirement | Level | Verify |
|---|---|---|---|
| 6.4.1 | A ResourceQuota sets requests.cpu, requests.memory, limits.cpu and limits.memory from the intake figures. | Must | kubectl describe resourcequota -n [team-name] |
| 6.4.2 | Object count quotas cap count/pods, count/secrets, count/configmaps, count/services and count/persistentvolumeclaims. Kubernetes describes count quotas as protection against exhausting control plane storage. | Must | Quota object. |
| 6.4.3 | services.loadbalancers and services.nodeports are set to 0 unless the intake justified exposure. | Must | Quota object. |
| 6.4.4 | Storage is capped with requests.storage and, where storage classes differ in cost, per-class keys such as [class].storageclass.storage.k8s.io/requests.storage; ephemeral storage is capped where nodes are shared. | Should | Quota object. |
| 6.4.5 | A LimitRange supplies defaultRequest and default values for containers, with max per container. Kubernetes notes that once a namespace has a CPU or memory quota, pods without requests or limits may be rejected, so the LimitRange keeps the quota workable. | Must | kubectl describe limitrange -n [team-name] |
| 6.4.6 | Use of high PriorityClasses is restricted with a quota scopeSelector on PriorityClass, so a tenant cannot pre-empt platform workloads. | Should | Quota object. |
Quotas and LimitRanges apply at admission and do not change objects that already exist, so set them before the first deployment. Quotas do not limit network bandwidth; the multi-tenancy guidance lists that as a gap needing other controls.
6.5 Network policy
| ID | Requirement | Level | Verify |
|---|---|---|---|
| 6.5.1 | The cluster's network plugin enforces NetworkPolicy. Without one, Kubernetes accepts the objects and ignores them. | Must | Platform attestation per cluster, plus a connectivity test. |
| 6.5.2 | A default deny policy with podSelector: {} and policyTypes of Ingress and Egress is applied first. | Must | Policy present; test pod cannot reach another namespace. |
| 6.5.3 | An allow rule permits egress to cluster DNS on UDP and TCP port 53, as the multi-tenancy guidance recommends alongside default deny. | Must | Test pod resolves a Service name. |
| 6.5.4 | Further allow rules match the intake flows only. Cross-namespace rules name namespaces explicitly; the guidance advises against an empty namespaceSelector: {}, which matches every namespace. | Must | Policy review against intake. |
| 6.5.5 | Egress to the cloud instance metadata endpoint and the internet is denied unless required. | Should | Connectivity test. |
For policy design beyond onboarding, see the Kubernetes Network Policy Guide.
6.6 Service accounts and secrets
| ID | Requirement | Level | Verify |
|---|---|---|---|
| 6.6.1 | The namespace's default service account has no RoleBindings and automountServiceAccountToken: false. | Must | ServiceAccount object; no binding names it. |
| 6.6.2 | Each workload that calls the API gets its own ServiceAccount with a minimal Role; workloads that do not call the API set automountServiceAccountToken: false in the pod spec, which overrides the service account setting. | Must | See How to find pods that automount service account tokens. |
| 6.6.3 | No long-lived kubernetes.io/service-account-token Secrets are created; workloads use the short-lived, automatically rotating tokens issued through the TokenRequest API. | Must | No Secrets of that type in the namespace. |
| 6.6.4 | Cloud and external credentials come from workload identity federation or an external secrets manager, not static keys in Secrets or ConfigMaps. | Should | See the Kubernetes Workload Identity Checklist. |
| 6.6.5 | Each ServiceAccount has a recorded owner and purpose (annotation), so it can be reviewed and removed. | Should | Annotations present. |
For secret storage, encryption and rotation inside the namespace, use the Kubernetes Secrets Security Guide; this checklist only sets the onboarding defaults.
6.7 Observability and hand-over
- 6.7.1 (Must): API server audit logging covers the namespace and the platform can search it by namespace, user and service account.
- 6.7.2 (Must): Evidence for every "must" item is stored with the request: rendered manifests,
auth can-ioutput, quota and LimitRange descriptions, connectivity test results. - 6.7.3 (Should): Quota usage alerts fire at [80%] so the team asks for more before deployments fail.
7. Threat and framework mapping
| Checklist area | Risk it reduces | ATT&CK | NIST SP 800-53 / CSF 2.0 |
|---|---|---|---|
| 6.2 RBAC | Tenant or stolen identity gaining rights beyond its namespace | T1613 Container and Resource Discovery | AC-3, AC-6; PR.AA-05 |
| 6.3 Pod Security | Privileged pods used to reach the node | T1610 Deploy Container | CM-6, CM-7; PR.PS-01 |
| 6.4 Quotas | Noisy neighbour or deliberate resource exhaustion | Not mapped | SC-6; PR.IR-04 |
| 6.5 Network policy | Lateral movement between tenant namespaces | Not mapped | SC-7; PR.IR-01 |
| 6.6 Service accounts | Misuse of the default service account and its token | T1078.001 Default Accounts | AC-2, AC-6; PR.AA-05 |
8. Ongoing review and decommissioning
- Quarterly, the namespace owner confirms the binding list and ServiceAccounts; unused ServiceAccounts are removed (see How to find unused Kubernetes service accounts).
- Quota and LimitRange values are compared with actual usage twice a year and adjusted through the bundle, not by hand.
- Drift between Git and the live namespace (labels, bindings, policies) is detected and reverted automatically or raised as an incident.
- At decommissioning, export what must be retained, delete external credentials and federated trust for the namespace's identities, then delete the namespace and confirm no ClusterRoleBinding or external trust still references it.
9. Exceptions
Any unmet "must" item needs a written exception naming the item, the reason, compensating controls, the approver from section 3 and an expiry of no more than [90 days]. Common legitimate cases are infrastructure agents that need privileged PSA (place them in a dedicated platform namespace instead) and namespaces that must expose a LoadBalancer Service. Expired exceptions are reported to [Security governance forum].
10. Metrics
- Percentage of tenant namespaces created from the current bundle version.
- Percentage of namespaces with PSA
enforceatbaselineorrestricted, and withauditandwarnatrestricted. - Percentage of namespaces with a default deny policy for both ingress and egress.
- Number of ClusterRoleBindings naming tenant groups (target: zero).
- Number of pods running with an automounted token on the
defaultservice account (target: zero). - Median time from request to hand-over, to show the process is not pushing teams to work around it.
Implementation guidance
- Build the bundle once. Write the Namespace, RoleBindings, ResourceQuota, LimitRange, default deny and DNS policies and the locked-down
defaultServiceAccount as a parameterised template in Git. - Test it on a scratch namespace with a sample workload that meets
restricted, and with one that does not, to confirm admission, quota and network behaviour. - Automate creation. Let the pipeline or a namespace management tool create namespaces only from the bundle, and remove the right to create namespaces from tenant groups.
- Bring existing namespaces in gradually. Apply
auditandwarnlabels first, use server-side dry run before raisingenforce, add quotas with a LimitRange in the same change, and add default deny only after the allow rules are tested. - Roll back safely. Each step is a Git change: reverting the commit restores the previous labels, quota or policy. Never remove default deny without replacing it with the intended allow rules.
Small teams on a single cluster can run this checklist by hand from the bundle, provided the evidence in 6.7.2 is kept. Larger estates should let a namespace management tool enforce the bundle and shared quotas across groups of namespaces, which the Kubernetes multi-tenancy guidance notes built-in quotas cannot do on their own. Where a tenant needs isolation stronger than namespaces provide, such as untrusted code or separate compliance scopes, give it dedicated nodes or a separate cluster instead of adding exceptions. The Kubernetes NHI Security Guide covers the machine identities this checklist creates.
Source baselines
- Kubernetes: Multi-tenancy
- Kubernetes: Role Based Access Control Good Practices
- Kubernetes: Pod Security Admission
- Kubernetes: Enforce Pod Security Standards with Namespace Labels
- Kubernetes: Resource Quotas
- Kubernetes: Limit Ranges
- Kubernetes: Network Policies
- Kubernetes: Service Accounts
This template is provided for guidance and must be adapted to your organisation. Related NHI Mgmt Group resources: Kubernetes Security Checklist · Kubernetes RBAC Guide · Kubernetes Network Policy Guide · Kubernetes Secrets Security Guide · Container and Kubernetes Security Policy Template