Egor Urvanov

Eviction

Kubernetes · การขับ pod ออก

Eviction คือการนำ pod ออกจาก node ของ Kubernetes: ระบบหยุด pod เช่น เมื่อ node เหลือหน่วยความจำหรือดิสก์น้อย. controller สังเกตว่าสำเนาหายไปและเริ่มใหม่บน node อื่น ในภาษาพูดคือ “to evict”: “pod got evicted” หมายความว่า Kubernetes นำมันออกจาก node ของมัน.

×node · out of memorykubelet evicts a pod✓another nodethe copy runs againreconcile loop: fewer copies than described → create oneThe node runs out of memory, the pod is evicted, a copy starts on another node

pod ถูก evict เมื่อไร

  • Node ทรัพยากรไม่พอ · node เหลือหน่วยความจำหรือดิสก์น้อย และ kubelet evict pod บางตัวเองเพื่อไม่ให้ทั้ง node ล่ม pod ที่ใช้เกินกว่าที่ขอไว้จะถูกเลือกก่อน.
  • ตามคำสั่ง · นำ node ออกเพื่อบำรุงรักษาด้วย kubectl drain: มัน evict pod ทีละตัวและปิดแต่ละตัวอย่างนุ่มนวล.
  • จากนั้นเกิดอะไรขึ้น · eviction เองไม่ได้เริ่มอะไรเลย: controller ใน reconcile loop สร้างสำเนาใหม่บน node อื่น เพราะมีสำเนาน้อยกว่าที่อธิบายไว้.

คำถามที่พบบ่อย

Eviction ใน Kubernetes คืออะไร

การนำ pod ออกจาก node ของ Kubernetes: ระบบหยุด pod เช่น เมื่อ node เหลือหน่วยความจำหรือดิสก์น้อย.

แหล่งที่มา: Kubernetes: Node-pressure eviction

คำศัพท์ที่เกี่ยวข้อง

อภิธานศัพท์ทั้งหมด

© 2026 Egor Urvanov