3 ms·
Crazy. I was just looking at this earlier when running into a problem with `kubectl exec` causing processes to leak in pods: 1. kubectl exec -ti foo -- bash #
by xelxebar 5y ago
Crazy. I was just looking at this earlier when running into a problem with `kubectl exec` causing processes to leak in pods:
1. kubectl exec -ti foo -- bash # start shell in some pod
2. echo $$ # get pid of that shell
3. # close terminal without explicitly exiting bash
4. kubectl exec -ti foo -- sh -c 'ls /proc/<previous pid>'
It looks like SIG* on the kubectl side aren't getting propagated to the in-pod process. Does anyone know of a proper way to prevent this process leak?
- deepsun 5y agoMaybe related: it matters whether you start your main in-pod process (entrypoint) though "sh java" or directly, e.g. "java". In the latter case all SIG* are received normally, but you cannot use env variables in command line.