Why K8S don't support PreStart Hook

11/17/2020

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?

-- Rosmee
containers
docker
kubernetes

1 Answer

11/17/2020

look at Init containers to do preStart task.

Note:

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

-- P Ekambaram
Source: StackOverflow