# From Linux Primitives to Kubernetes Security Contexts

DevFeed: [From Linux Primitives to Kubernetes Security Contexts](<https://devfeed.tech/articles/from-linux-primitives-to-kubernetes-security-contexts-19144.md>)

Original publisher: [Read original article](<https://learnkube.com/security-contexts>)

Author: Dave Altena

Published: 2025-08-11T00:00:00Z

Content type: article

Language: en

Sources: [Learnk8s](<https://devfeed.tech/sources/learnk8s.md>)

Topics: [Security](<https://devfeed.tech/topics/security.md>), [container](<https://devfeed.tech/topics/container.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [cgroups](<https://devfeed.tech/topics/cgroups.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [capabilities](<https://devfeed.tech/tags/capabilities.md>), [cgroups](<https://devfeed.tech/tags/cgroups.md>), [configure](<https://devfeed.tech/tags/configure.md>), [container](<https://devfeed.tech/tags/container.md>), [containers](<https://devfeed.tech/tags/containers.md>), [context](<https://devfeed.tech/tags/context.md>), [docker](<https://devfeed.tech/tags/docker.md>), [field](<https://devfeed.tech/tags/field.md>), [filesystem](<https://devfeed.tech/tags/filesystem.md>), [filesystems](<https://devfeed.tech/tags/filesystems.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [kubernetes-security](<https://devfeed.tech/tags/kubernetes-security.md>), [linux](<https://devfeed.tech/tags/linux.md>), [low-level](<https://devfeed.tech/tags/low-level.md>), [namespaces](<https://devfeed.tech/tags/namespaces.md>), [networking](<https://devfeed.tech/tags/networking.md>), [pods](<https://devfeed.tech/tags/pods.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

Containers in Kubernetes run as Linux processes on the host kernel, isolated with namespaces, cgroups, and a separate virtual filesystem. Kubernetes does not impose a non-root policy: the image's default user applies unless overridden. A pod's `securityContext` declaratively configures process behavior, but Kubernetes passes those settings to the container runtime, which maps them to kernel features. The excerpt identifies controls for choosing the container user, managing Linux capabilities, using read-only filesystems, and blocking privilege escalation; it explains that root access can increase host privilege-escalation risk if a container is compromised. The supplied text ends as it begins discussing syscalls, so it does not provide the configuration details or practical YAML steps.

## Source excerpt

Dive deep into Kubernetes Security Contexts and learn how to manage security settings for your pods and containers.