k8s shared process docs sample - doesn't quite work
In the example, the following yaml is given but when it ask you to do
kubectl attach -it nginx -c shell
It will go into a black hole. To resolve this, try
kubectl exec -it nginx -c shell sh
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
shareProcessNamespace: true
containers:
- name: nginx
image: nginx
- name: shell
image: ubuntu
command: ["sleep", "3600"]
securityContext:
capabilities:
add:
- SYS_PTRACE
stdin: true
tty: true
Comments