Kubernetes Cluster Administration
medium

Questão de Kubernetes Cluster Administration #019e3a4f

Enunciado da Questão
Kubernetes Cluster Administration
#kubernetes
#node-controller
#eviction-timeout
#node-monitoring
Médio

What is the default eviction timeout when the Ready condition of a node is Unknown or False?

A

Thirty seconds.

B

Thirty minutes.

C

One minute.

D

Five minutes.

Correta

Explicação Oficial / Explicações da Comunidade

The default eviction timeout when the Ready condition of a node is Unknown or False is five minutes. This is controlled by the node-monitor-grace-period and pod-eviction-timeout settings in the Kubernetes controller manager. The node controller checks the node status every node-monitor-period (default 5 seconds). If the node's Ready condition remains Unknown or False for longer than node-monitor-grace-period (default 40 seconds), the node is marked as unreachable. After that, the controller waits for pod-eviction-timeout (default 5 minutes) before evicting pods from the node. Thus, the total time from the first failure to pod eviction is approximately 5 minutes and 40 seconds, but the eviction timeout itself is 5 minutes.

How it Works:

  • The node controller monitors node heartbeats (updates to .status.conditions).
  • If the Ready condition is Unknown or False, the controller starts a timer.
  • After node-monitor-grace-period (40s), the node is considered unhealthy.
  • After an additional pod-eviction-timeout (5 minutes), pods are evicted.

Why the correct value is right: The Kubernetes documentation and source code specify pod-eviction-timeout as 5 minutes by default. This value balances between allowing temporary network issues to resolve and ensuring timely rescheduling of workloads.

Why the incorrect values are wrong:

  • Thirty seconds: This is too short; it would cause unnecessary pod evictions due to transient network glitches.
  • Thirty minutes: This is too long; it would delay recovery from node failures, leading to prolonged service disruption.
  • One minute: While longer than 30 seconds, it is still insufficient to tolerate typical temporary failures and would cause frequent evictions.