Sunday, September 26, 2021

What I learned about Kubernetes - (Scheduling - Static Pod)

                ဒီ article မှာတော့ ကျွန်တော်တို့ scheduling ရဲ့ အဆက်ဖြစ်တဲ့ static pod အကြောင်းလေ့လာကြည့်မယ်။ 

So, What's static pod?

                Static pod ဆိုတာက kubernetes cluster အတွင်းမှာရှိမနေဘူး တစ်နည်းအားဖြင့် kubernetes ရဲ့ api server (control plane) နဲ့ တည်ဆောက်ထားတာမဟုတ်ပဲ kublet နဲ့ပဲ တည်ဆောက်ထားတာ ဖြစ်ပါတယ်။ တစ်နည်းအားဖြင့် kublet + docker (underlying container service) = static pod ဖြစ်ပါတယ်။ Kubernetes ရဲ့ control plane componentes တွေနဲ ့ တည်ဆောက်ထားတာ မဟုတ်တဲ့ အတွက် static pod ကို deployment တို့ replicasets type လိုမျိုး တည်ဆောက်လို့ မရပါဘူး။ Static pods တွေကို /etc/kubernetes/manifests directory အောက်မှာ တည်ဆောက် နိုင်ပါတယ်။ Definition file (yaml) ကို /etc/kubernetes/manifests directory အောက်မှာ ထားလိုက်တာနဲ့ kubectl create သုံးစရာမလိုပဲ pod create လုပ်သွားမှာဖြစ်ပါတယ်။ Static pod တွေ create လုပ်ပြီးတဲ့ အခါမှာလဲ ကြည့်တဲ့ အခါ kubectl get pods နဲ့ ကြည့်နိုင်သလို docker ps command ဖြင့် ကြည့်နိုင်ပါတယ်။ 

Let's create a static pod

             ဒီမှာတော့ nginx pod yaml file တစ်ခု ကို  create လုပ်ပြီး /etc/kubernetes/manifests အောက်မှာ သွားထားမှာဖြစ်ပါတယ်။ /etc/kubernetes/manifests အောက်ထားပြီးတာနဲ့ kubectl get pods (or) docker ps ဖြင့် ခေါ်ကြည့်တဲ့ အခါ nginx-staticpod တစ်ခု running ဖြစ်နေတာ တွေ့မှာ ဖြစ်ပါတယ်။ kubectl command ကို သုံးပြီး static pod ကို edit ၀င်ပြင်ဆင်လို့ မရပါဘူး။ Static pod ကို delete လုပ်ချင်ရင်တော့  /etc/kubernetes/manifests အောက်က staticpod yaml file ကို ဖျက်ရမှာ ဖြစ်ပါတယ်။ 






အိုကေ, ဒီ article ကတော့ scheduling session ရဲ့ staticpod အကြောင်းဖြစ်ပါတယ်။

That's it 😊


Pls Like and Subscribe Our Root Of Info FB Page and Youtube Channel



Thank you!!!


Share:

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.