seccompunconfined for a container in a kubernetes pod? Or changing default in docker 1.10?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
seccomp=unconfined disables seccomp filtering for the container, which means the process is no longer restricted by the runtime's seccomp syscall profile. In Kubernetes, the modern way to express this is through securityContext.seccompProfile.type: Unconfined. That is possible, but it weakens isolation and should be treated as a narrow exception rather than a default setting.
What Seccomp Is Doing
Seccomp limits which Linux syscalls a process may make. Container runtimes use it to reduce kernel attack surface by denying or constraining risky calls. In practical terms, seccomp is one of the baseline security layers that make ordinary containers less exposed than unrestricted host processes.
So when you mark a container unconfined, you are saying:
- do not apply the normal seccomp restrictions
- let the process access the full syscall surface available under its other privileges
That can be necessary for some software, but it should be treated as a security decision, not just a compatibility toggle.
Modern Kubernetes Configuration
In current Kubernetes, seccomp is configured on the pod or container security context. To disable seccomp for one container:
This disables seccomp for that container. A pod-level security context can also define a default profile for all containers in the pod, unless an individual container overrides it. In hardened clusters, admission or policy controls may reject Unconfined, so it is worth checking cluster security policy as well as manifest syntax.
Historical Kubernetes and Docker Context
Older Kubernetes versions used seccomp annotations rather than the current seccompProfile field. Older Docker versions such as Docker 1.10 also centered the discussion around the default Docker seccomp profile and whether to run unconfined.
The core idea has not changed:
- default profile means some syscalls are filtered
- unconfined means the filter is removed
The modern Kubernetes API is cleaner, but the security tradeoff is the same.
Should You Change the Default?
Usually, no. Changing the runtime default to unconfined for everything is a broad weakening of security posture. If one legacy application needs extra syscalls, it is better to make that exception explicitly for that workload rather than turning off seccomp globally.
A safer decision order is:
- keep the default profile when possible
- use a custom profile if the workload needs a few additional syscalls
- use
Unconfinedonly when the application truly cannot run under any practical profile
That keeps the blast radius contained.
Why Some Containers Need Unconfined
A few workloads interact with the kernel in unusual ways, for example:
- low-level tracing or debugging tools
- specialized sandbox or emulator software
- legacy programs expecting syscalls denied by the default profile
If a container fails only because seccomp blocks a required syscall, then an unconfined or custom profile may be justified. But that should be confirmed by diagnosis, not guessed.
Prefer a Custom Profile Over Full Unconfined
If you know which additional syscalls are needed, a custom seccomp profile is usually better than disabling seccomp entirely. That preserves the default-deny value for most of the attack surface while permitting only the extra calls your workload actually needs.
This is the same principle as least privilege in identity systems: do not remove the control entirely when a narrower exception would work.
Common Pitfalls
- Turning off seccomp globally because one container fails.
- Using
Unconfinedas a debugging shortcut and forgetting to restore a profile later. - Assuming privileged mode and seccomp are the same security control.
- Migrating old annotation-based guidance directly into modern Kubernetes manifests.
- Disabling seccomp without verifying which syscall restriction caused the problem.
Summary
- '
Unconfineddisables seccomp filtering for a container.' - In modern Kubernetes, use
securityContext.seccompProfile.type: Unconfined. - This reduces isolation and should be an explicit exception, not a default.
- Prefer the default profile or a custom profile when possible.
- Historical Docker and annotation-based Kubernetes guidance map to the same core security tradeoff.
Related reading
- Secret management in Helm Charts
- Secure access to a private helm repository
- Security Yaml Bomb user can restart kube-api by sending configmap
- securityContext.privileged Forbidden disallowed by cluster policy
- See full command of running/stopped container in Docker
- SELinux is not supported with the overlay graph driver
- SecItemAdd and SecItemCopyMatching returns error code -34018 errSecMissingEntitlement
- Secure hash and salt for PHP passwords

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.