Pod Security
Understand Pod Security controls, securityContext, privileged containers, root users, capabilities, host access, and admission policy.
Last reviewed: June 2026
🔍 What Is It?
Pod Security is the set of Kubernetes controls and policies that limit risky Pod behavior.
It includes Pod Security Admission, securityContext, non-root execution, capabilities, seccomp, host namespace restrictions, and admission policy tools.
🎯 Why Do We Need It?
Containers share node kernels. Risky Pod settings can expose host files, privileged operations, credentials, or neighboring workloads.
Common developer mistakes:
- →Treating Kubernetes YAML as copy-paste configuration instead of production architecture
- →Ignoring requests, limits, health probes, security context, and rollout behavior
- →Debugging only the Pod while forgetting Services, DNS, NetworkPolicies, nodes, and admission controls
- →Manually changing live objects without updating Git or infrastructure automation
🏗️ What Happens in Real Projects?
A platform labels namespaces with restricted Pod Security standards. Application Pods must run as non-root, drop Linux capabilities, avoid hostPath, and use read-only root filesystems where practical.
⚙️ How It Works
Admission controllers validate Pod specs before creation. securityContext settings define runtime user, privileges, capabilities, seccomp profile, and filesystem behavior.
💻 Example
Restricted security context — A safer container runtime baseline.
🤔 Common Confusions
❓ Is Pod Security the same as NetworkPolicy?
No. Pod Security controls runtime privileges. NetworkPolicy controls network traffic.
❓ Can all apps run with read-only root filesystem?
Not all without changes. Apps may need writable tmp volumes or code changes.
❓ Are privileged Pods always bad?
Some platform agents need elevated permissions, but they require strict ownership and review.
🚨 Common Production Issues
**Privileged containers** can access host-level capabilities.
**Running as root** increases impact of container compromise.
**hostPath mounts** expose sensitive node files.
**No admission policy** lets risky specs reach production.
✅ Best Practices
Use restricted Pod Security standards for app namespaces
Run as non-root and drop capabilities
Avoid privileged and hostPath usage for application Pods
Use seccomp RuntimeDefault
Review exceptions centrally
🏛️ Architect's Note
Pod Security is a blast-radius control. The goal is not perfect isolation; it is making compromise harder and less damaging.
💬 Frequently Asked Questions
🎯 Key Takeaways
🔗 Related Topics
🎯 Practice this topic in interviews
↗ Where this topic fits
Kubernetes Technology Guide
Return to the Kubernetes learning hub.
Cloud Engineer Career Path
A practical route through cloud fundamentals, AWS services, containers, delivery, and architecture-focused interview preparation.
DevOps Engineer Career Path
A structured route through automation, container delivery, platform operations, production support, and interview preparation.
Sources
Sources / References
Use these Kubernetes references to verify the concept in official docs and continue into the most relevant SplashRide pages.
Official documentation
Related SplashRide pages
SplashRide Kubernetes learning path
Browse the full Kubernetes topic collection and learning order on SplashRide.
Kubernetes Interview Prep
Practice Kubernetes interview questions and scenario-based answers.
Cloud Engineer Career Path
A practical route through cloud fundamentals, AWS services, containers, delivery, and architecture-focused interview preparation.
DevOps Engineer Career Path
A structured route through automation, container delivery, platform operations, production support, and interview preparation.
Service Accounts
Learn Kubernetes ServiceAccounts for workload identity, API access, token projection, cloud identity integration, and least privilege.
RBAC
Understand Kubernetes RBAC for controlling API access through Roles, ClusterRoles, RoleBindings, and ClusterRoleBindings.