Cybersecurity glossary

What is Namespace Isolation?

Learn what namespace isolation means on Linux and in Kubernetes, why a K8s namespace is not a security boundary by itself, and which extra controls make isolation real.

Cloud, containers and KubernetesUpdated August 13, 2026
Also known asLinux namespace isolationKubernetes namespace isolationNamespaced isolation

Definition

Namespace isolation is the use of separate namespaces to limit what a process or tenant can see: Linux namespaces partition kernel resources (PID, network, mounts, users), while Kubernetes namespaces partition API objects—neither is a complete security boundary without matching policy.

Why namespace isolation is easy to over-trust

The word namespace appears in two layers that operators mix up. Linux namespaces are how containers hide PIDs and network stacks. Kubernetes Namespaces are how the API groups objects for teams.

Namespace isolation is real in both places—and incomplete in both places. A PID namespace does not stop a privileged mount. A Kubernetes Namespace does not stop a pod from calling a database in another Namespace.

Linux namespaces: what a container actually hides

PID

The process sees its own PID 1. hostPID turns that off and exposes the node’s process list.

Network

A veth and namespace give the pod its IPs. hostNetwork shares the host stack, including IMDS routing.

Mount

The container rootfs is a view of mounts. hostPath punches a hole to the node filesystem.

User

Maps container UIDs to host UIDs. Skipping user namespaces makes container root much more dangerous.

Kubernetes namespaces: what the API actually hides

1

Objects get a Namespace name

Pods, Services, Roles, and Secrets live in a namespace. Nodes and ClusterRoles do not.

2

DNS and Service names partition

svc.ns.svc.cluster.local is unique per namespace, which is convenience, not a firewall.

3

RBAC can be scoped

A RoleBinding in team-a does not grant team-b—unless you also created a ClusterRoleBinding.

4

Quotas can cap noisy neighbors

ResourceQuota and LimitRange are isolation of capacity, not of data.

5

Traffic still needs NetworkPolicy

Without it, the CNI is usually a flat network across namespaces.

Two meanings, two failure modes

LayerIsolatesFails when
Linux namespacesWhat a process can see in the kernelPrivileged, hostPath, hostPID/hostNetwork, or a runtime CVE
Kubernetes NamespaceAPI object names and optional RBAC/quota scopeCluster-admin, missing NetworkPolicy, or shared IAM/node roles
Both togetherA reasonably packed multi-team clusterEither layer is treated as sufficient on its own

Namespace isolation checklist

  • Say which namespace you mean in reviews: Linux, Kubernetes, or both.
  • Forbid hostPID, hostNetwork, hostIPC, and hostPath on application pods via Pod Security.
  • Enable user namespaces where the platform supports them so container root is not host root.
  • Put each team in a Kubernetes Namespace with RoleBindings, not ClusterRoleBindings.
  • Add default-deny NetworkPolicy; namespaces never implied packet isolation.
  • Apply ResourceQuota so one namespace cannot starve the node pool.
  • Do not store other tenants’ Secrets in a shared namespace “to make volume mounts easier.”
  • For hostile tenants, do not stop at Kubernetes namespaces—see multi-tenant isolation.

The practical takeaway

Namespace isolation is two technologies that share a name. Linux namespaces hide kernel resources from a process. Kubernetes Namespaces hide API objects from a team.

Use both, then add RBAC, NetworkPolicy, quotas, and Pod Security. A Namespace label in YAML is not a wall; it is a naming scope you still have to enforce.

Related security terms

Frequently asked questions

What is namespace isolation in simple terms?

It means “this process or team should not see everything.” On Linux that is kernel namespaces. In Kubernetes it is also an API folder called a Namespace. The word is shared; the guarantees are not.

Does a Kubernetes Namespace isolate network traffic?

No. Pods in different namespaces can still connect unless NetworkPolicy (and the CNI) denies it. The Namespace object is not a firewall.

What do Linux namespaces isolate?

Commonly PID, network, mount, UTS (hostname), IPC, time, and optionally user IDs. A container is a process with a bundle of these.

What is a user namespace?

A mapping so container UID 0 is an unprivileged UID on the host. Without it, container root is often host root if other controls fail.

Why do people say Kubernetes namespaces are not a security boundary?

Because they only partition object names. Without RBAC, quotas, NetworkPolicy, and Pod Security, tenants share the kernel, the CNI, and often too much API power.

Can hostPID or hostNetwork disable namespace isolation?

Yes. Those pod fields join the host’s PID or network namespace. Admission should forbid them on application workloads.

Are two Kubernetes namespaces enough for two customers?

Only for soft, trusted tenancy with a full policy pack. Hostile tenants need stronger isolation than Kubernetes namespaces provide.

References

Explore authoritative guidance and frameworks related to namespace isolation.

Explore every security definition

Return to the glossary to search by term, alias, starting letter, or security category.

Browse glossary