As we know, k8s supports postStart and preStop lifecycle hook, but in most cases what we need is actually preStart.
Is there any reason not implementing the preStart hook?
look at Init containers to do preStart task.
In fact there is already a PR requested to introduce prestart and postStart hooks in pod lifecycle. It has been pending since 2014 and not much progress is seen. follow the link -> https://github.com/kubernetes/kubernetes/issues/140