I’m in the process of deploying an Elixir app to a kube cluster. For those who haven’t played with kube, it has the concept of a liveness and readiness probe which it uses to monitor service state and start/restart/backoff as necessary.
This is easy to setup for a Phoenix app because I access routes over HTTP, but the app I’m now deploying is a simple worker with a simple supervisor, no server, etc,.
I’ve looked at pid_file hex package which seems to be the way to go, but just wondering if anyone has experience with this and if it is reliable, or if there other suggestions for how I might go about this?
Confirmed. If Erlang crashes it brings the container down which will then adhere to its restart policy. Couldn’t bring down the main process (pid 1) from within container, but did manage to kill erl_child_setup. Cheers