<p>When I run <code>shutdown -h now</code> command to shutdown a node in kubernetes cluster, endpoint update its state after about 40 seconds, but when I run command <code>kubectl delete pod POD-NAME</code>, endpoint update its state very quick. Can anyone explain why?</p>

Ren
<p>When you &quot;shutdown&quot; a node, you should do it gracefully with <a href="https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/" rel="nofollow noreferrer">kubectl drain</a>. This will evict the pods in a controlled manner and this should be more friendly to your traffic.</p>
<p>The article <a href="https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-terminating-with-grace" rel="nofollow noreferrer">Kubernetes best practices: terminating with grace</a> has a detailed description on all steps that happen when a Pod is <em>gracefully</em> terminated. For all planned maintenance, use gracefully shutdown - for unplanned maintenance you can not do much.</p>
