1. Share process namespace between containers in Pod
kubernetes official website link
Process namespace sharing is enabled using the ShareProcessNamespace field in v1.PodSpec. E.g:
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
shareProcessNamespace: true
containers:
- name: nginx
image: nginx
- name: shell
image: busybox
securityContext:
capabilities:
add:
- SYS_PTRACE
stdin: true
tty: true
- The container process no longer has it
PID 1
. In noPID 1
case where the number of rejected containers start image (e.g., using systemd container), or refuse to executekill -HUP 1
the command or the like to notify the process vessel. In the process of having a shared namespacepod
, thekill -HUP 1
will notify thepod
sandbox (in the example above/pause
). - Process to
pod
be seen in other containers. This includes/proc
all visible information, such as password passed as a parameter or environment variables. These routine byUnix
protection rights. - Container file system
/proc/$pid/root
linkspod
visible to other containers. This makes debugging easier, but it also means that file system security is only protected by file system permissions.