In Kubernetes does a host (a worker node), a pod in the node and the container in the pod all have separate process namespace?

2/27/2020

In docker host and the containers do have separate process name-space. In case of Kubernetes the containers are wrapped inside a pod. Does that mean in Kubernetes the host (a worker node), the pod in the node and the container in the pod all have separate process namespace?

-- ananda
kubernetes

1 Answer

2/27/2020

Pods don't have anything of their own, they are just a collection of containers. By default, all containers run in their own PID namespace (which is separate from the host), however you can set all the containers in a pod to share the same one. This is also used with Debug Containers.

-- coderanger
Source: StackOverflow