Kubernetes Scheduler Plugins & Profiles
July 28, 2026
Overview
Scheduler က pod တွေကို node မှာ schedule လုပ်တဲ့အခါ plugin-based architecture သုံးတယ်။ Profiles ကို သုံးပြီး different scheduling behaviors ထည့်လို့ရတယ်။ Extension points တွေ ရှိပြီး custom logic ထည့်လို့ရတယ်။
Scheduling Framework
Phase 1: Scheduling Cycle
Pod အသစ် create → Node ရှာမယ် → Bind လုပ်မယ်
- Queue Sort - Pod priority စီတယ်
- Pre-Filter - Pre-processing လုပ်တယ်
- Filter - မသင့်တော်တဲ့ nodes ဖယ်ထုတ်တယ်
- Post-Filter - Filter ပြီးရင် additional processing
- Pre-Score - Scoring အတွက် prepare လုပ်တယ်
- Score - Node တွေကို အမှတ်ပေးတယ်
- Normalize Score - Scores တွေကို normalize လုပ်တယ်
- Reserve - Node ကို temporarily reserve လုပ်တယ်
- Permit - Binding ကို ခွင့်ပြုလား စစ်တယ်
Phase 2: Binding Cycle
- Pre-Bind - Bind မလုပ်ခင် preparation (volume attach)
- Bind - Pod ကို node နဲ့ bind လုပ်တယ်
- Post-Bind - Bind ပြီးရင် cleanup/notification
Built-in Plugins
Filter Plugins
- NodeResourcesFit - Node မှာ resource လုံလောက်လား စစ်တယ်
- TaintToleration - Node taint တွေကို pod က tolerate လုပ်လား
- NodeAffinity - Pod က ဘယ် node မျိုးမှာ run ချင်လဲ
- PodAffinity/PodAntiAffinity - Pod တွေ အချင်းချင်း
Score Plugins
- NodeResourcesFit - Resource availability အပေါ် အမှတ်ပေး
- ImageLocality - Image ရှိပြီးသား node ကို prefer လုပ်
Scheduler Profiles
တစ်ခု scheduler process မှာ multiple profiles run လို့ရတယ်။ Different workloads အတွက် different scheduling behaviors သုံးလို့ရတယ်။
Profile Examples
- default-scheduler: Web applications, spread evenly
- gpu-scheduler: ML training, pack GPU nodes
- batch-scheduler: Batch jobs, bin packing
Pod မှာ သုံးပုံ
spec:\n schedulerName: gpu-scheduler\n containers:\n - name: app\n image: myapp