For purposes beyond that which is necessary to describe here, it is necessary for me, in order to accomplish my goal, to exec
into pods, determine the primary process's PID, and then perform some actions in running pods' /proc/<PID>/
.
So the problem is obvious perhaps. Given arbitrary pods, how can one programmatically determine the main PID (not side-cars) in running pods realizing that the ENTRYPOINT
in the container image is the COMMAND
to kubernetes and that specific overrides can occur if COMMAND
is specified (thus one could simply describe
or get -o yaml
the pod, but that is not scalable because not all pods are run/created equal. So such queries would only be right sometimes)...
Is there definitive way to accomplish this goal and if so, what is it? I don't think there's a really solid way to do this, but I want to confirm that.
0 Answers