⚡
All Cloud Brew Shots
CLOUD BREW PERSPECTIVE
Kubernetes & OpenShift 1 min shot

Namespaces Are Not Security Boundaries in Kubernetes

Tharun Vempati
Tharun Vempati
GCP Cloud Architect · CKA · OpenShift Specialist
Follow on LinkedIn

“Don’t worry, that service runs in its own namespace.”

Every platform engineer has heard this phrase in an architecture review. And in vanilla Kubernetes, it is one of the most dangerous misconceptions in cloud-native security.

By default, Kubernetes uses a flat pod network. Unless your CNI enforces network policies, a compromised pod in namespace-marketing-dev can open a direct TCP connection to a database or internal API in namespace-payments-prod using nothing more than its cluster IP or DNS name.

A Namespace is just an API naming scope—not a firewall.

If you want real tenant or environment boundaries inside a shared cluster, every namespace provisioning template needs three non-negotiable defaults on Day 1:

  1. A default-deny ingress & egress NetworkPolicy that blocks all cross-namespace traffic unless explicitly allow-listed.
  2. ResourceQuota and LimitRange so a runaway deployment in one namespace cannot starve node CPU/memory for neighbors.
  3. Dedicated ServiceAccount bindings with automountServiceAccountToken: false wherever pods don’t talk to the Kubernetes API.
The Takeaway

A vanilla Kubernetes Namespace is just an organizational folder until you lock it down with default-deny NetworkPolicies, ResourceQuotas, and least-privilege ServiceAccounts.

#Kubernetes #OpenShift #CloudNative #DevSecOps #PlatformEngineering