A PID namespace isolates process identifiers and process hierarchies. A container therefore sees its own process tree instead of the host’s or another container’s processes, while the host still sees those processes as ordinary host processes. section 2.3.2 section 2.3.1
A PID namespace creates several practical distinctions:
- The container’s main process commonly appears as PID 1 inside the container, while the same process has a different PID in the host namespace. section 2.3.2
- Processes in separate PID namespaces cannot see one another in process listings or send signals such as SIGTERM or SIGINT. section 5.1.1
- A pod uses separate process namespaces by default; setting shareProcessNamespace to true gives all its containers one process tree. section 5.3.6
Compare process views
Run ps aux inside a container and see only its small process list, such as node app.js, a shell, and ps. Run ps aux on the host and find the same application process under a different, host-level PID. For pod debugging, set shareProcessNamespace: true and use an ephemeral container; ps then shows the application, sidecar, shell, and pause processes together.

