It is a recommended best practice to not run dockerized Node.JS applications as PID 1 (see https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#handling-kernel-signals) in order to correctly capture signals.
The docker run
command provides the --init
flag to wrap the application entry point with a small init system that forwards signals correctly.
Is there a built-in equivalent of the --init
flag in Kubernetes?
I've explored the Pod and Container object specifications for Kubernetes 1.10 but have not seen anything related to specifying how the image gets started.
An alternative would be to explicitly include and use Tini in every container, but I would really like some way that does it transparently the way the --init
flag behaves.
Are there other alternatives?