Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubernetes: how do we kill the pod? #46

Closed
miekg opened this issue Jan 11, 2018 · 2 comments
Closed

kubernetes: how do we kill the pod? #46

miekg opened this issue Jan 11, 2018 · 2 comments

Comments

@miekg
Copy link
Member

miekg commented Jan 11, 2018

CoreDNS needs SIGINT for the shutdown handlers to be called. I just implemented lameducking in the health middleware which will only work for SIGINT.

SIGTERM will just stop the process immediately.

@johnbelamaric
Copy link
Member

Looks like k8s just sends a SIGTERM, no SIGINT:

ann-m-jbelamaric:coredns jbelamaric$ kubectl -n kube-system logs coredns-579f8497d5-6bxkp --follow
.:53
2018/01/11 19:24:46 [INFO] CoreDNS-1.0.0
2018/01/11 19:24:46 [INFO] linux/amd64, go1.9.1, a04eeb9c
CoreDNS-1.0.0
linux/amd64, go1.9.1, a04eeb9c
2018/01/11 19:26:19 [INFO] SIGTERM: Terminating process
ann-m-jbelamaric:coredns jbelamaric$

We could add a preStop hook that sends a SIGINT instead. https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/

@miekg
Copy link
Member Author

miekg commented Jan 11, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants