ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်
ဒီ round က learn ခဲ့ပြီးသား Basic/Intermediate concept တွေကို လက်တွေ့ ပြန်စမ်းကြည့်ဖို့ round ပါ — အသစ်ဘာမှ သင်ပေးမှာ မဟုတ်ဘူး, Pod vs Deployment vs Service ကို ခွဲသိခြင်း, YAML ထဲက error ကို ရှာဖွေခြင်း, kubectl command ကို မှန်ကန်စွာ ရေးတတ်ခြင်းကိုပဲ ကိုယ်တိုင် လက်တွေ့ လုပ်ကြည့်ရမှာပါ။ Task တစ်ခုချင်းစီက ၅ မိနစ်ထက် မကြာသင့်ပါဘူး။
လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်
Task 1: 'Pod', 'Deployment', 'Service' သုံးလုံးရဲ့ တာဝန် ကွာခြားချက်ကို ဝါကျတစ်ကြောင်းစီနဲ့ ရှင်းပြပါ။ Task 2: Deployment YAML တစ်ခုမှာ `selector.matchLabels: app: web` ရေးထားပေမယ့် `template.metadata.labels` မှာ `app: website` လို့ မှားရေးထားရင် ဘာ error ဖြစ်မလဲ ခန့်မှန်းပြီး ရေးပါ။ Task 3: Service type ၃ မျိုး (ClusterIP, NodePort, LoadBalancer) ကို ဘယ်အခါသုံးရမလဲ ဥပမာနဲ့တကွ ရေးပါ။ Task 4: `kubectl get pods` run လိုက်ရင် pod status 'Pending' ဖြစ်နေတယ်ဆိုရင် ဘယ် command ၂ ခုနဲ့ debug စမလဲ ရေးပါ။
အတူတူ ကြည့်မယ်
# Task 2 - label mismatch
selector.matchLabels: { app: web }
template.metadata.labels: { app: website } # MISMATCH!
Result: Deployment creates pods with label "app: website",
but its own selector looks for "app: web" — it will never
see its own pods as "managed", and may create pods endlessly
or error depending on the Kubernetes version.
# Task 4 - debug a Pending pod
kubectl describe pod <pod-name> # check Events for the reason
kubectl get nodes # check if any node has capacityPod/Deployment/Service ကွာခြားချက်၊ label mismatch bug ရှာဖွေခြင်း၊ Pending pod debug command များ ရရှိလာမည်။၅ မိနစ် စမ်းကြည့်
ကိုယ်ပိုင် Deployment YAML တစ်ခု ရေးပြီး တမင် label mismatch bug ထည့်ကြည့်ပါ — `kubectl apply` ပြီးရင် ဘာဖြစ်လဲ ကိုယ်တိုင် သက်သေပြကြည့်ပါ။
သတိလေးတစ်ချက်
ဒီ round မှာ cluster အသစ် setup လုပ်ဖို့ မလိုပါဘူး — concept/debugging logic ကိုပဲ အဓိကထား practice လုပ်ခြင်းပါ။