The below snippet is taken from default Corefile of coredns.
data:
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
In this snippet, health plugin is used to report health status to http://localhost:8080/health. If 200 OK is reported means healthy coredns pod. But I have few queries, If anything other than 200 OK is reported as health status of coredns pod, will kubernetes destroy and recreate the coredns pod ? Or how it will be handled by kubernetes?
If coredns pod is unhealthy, how is it handled to make it healthy? will kubernetes automatically take care of ensuring a healthy coredns pod ? What is the advised lameduck duration? Based on what parameters, we can come to a appropriate lameduck duration.
It would be really helpful if anyone can comment on this. Thanks in advance!
I have coredns deployed on a cluster in the kube-system namespace:
kubectl describe deploy coredns -n kube-system
Output: Liveness: http-get http://:8080/health delay=60s timeout=5s period=10s #success=1 #failure=5 Readiness: http-get http://:8181/ready delay=0s timeout=1s period=10s #success=1 #failure=3
The Liveness/Readiness probes that are used for this must be configured