For some maintenance reasons I regularly have to kill my Kong-pod in kubernetes.
In our setup we have a fixed timeout of a few seconds, so I would like to wait until all connections are closed.
Usually in kubernetes in such cases, I adjust the “terminationGracePeriodSeconds” and add a “preStop” hook with some delay.
My questions:
Which command should I configure in “preStop” to achieve a smooth shutdown?
It is better to sleep a few seconds and then let Kong handle the k8s SIGTERM signal?
or should I run “kong quit --timeout …” or maybe do both of them?
Regards
matu
PS: the scenario above is just an example. I want to know what do other experts think is the best approach of killing a Kong pod.