<p>I simply do <code>CMD ["node", "/dist/app.js"]</code> from my dockerfile to run my master process inside the container. Container is hosted in Kubernetes. </p>

<p>When something goes wrong with the pod, kubernetes rc will spin up another one. </p>

<p>However, if my master process crashes inside the pod-->container, will Kubernetes know about it? </p>

<p>Wondering whats the best way to monitor the process running inside the container, log crashes and restart the process as appropriate so that my client doesn't get 500 when calls gets routed to the crashed container.</p>

<p>In the VM world, I used forever, where forever will give me logs + allows me to configure restarts etc.. what is equivalent in container/kubernetes world?</p>

<p>Thanks !</p>

<p><a href="https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/user-guide/production-pods.md#liveness-and-readiness-probes-aka-health-checks" rel="noreferrer">Liveness and readiness probes</a> are designated to be pod health checks in Kubernetes world.</p>
