Tuesday, February 2, 2021

What I learned about Kubernetes - (Kubernetes Architecture & Components)

                       အခုကျွန်တော် CKA (Certified Kubernetes Administrator) exam အတွက် ပြင်ဆင်နေတာဖြစ်ပါတယ်။ Exam အတွက် ပြင်ဆင်နေရင်း တစ်ခါထဲ ကျွန်တော့် လေ့လာထား တဲ့ kubernetes အကြောင်းတွေကို အခု article ကနေစတင်ပြီး ရေးသွားမှာဖြစ်ပါတယ်။ CKA exam အတွက် Udemyက Mumshad/KodeCloud ရဲ့ သင်ခန်းစာတွေနဲ့ Kubernetes documentation တွေကနေလေ့လာပါတယ်။ 

Appreciate your understanding if anything that I missed out (or) not sufficient to mention in this what I learned about the Kubernetes series. ✌


So, Let's get started 👍


What is Kubernetes?


           Kubernetes က container-orchestration system တစ်ခု ဖြစ်ပါတယ်။ container-orchestration ဆိုတာက မိမိရဲ့ environment မှာ container (i.e docker container) တွေကို utilize လုပ်တာများလာတယ် ဒီများပြားလာတဲ့ container တွေကို administration ( i.e scaling, monitoring, scheduling, etc) လုပ်ရတဲ့ overhead ဖြစ်လာတယ် manually manage လုပ်ရတာ ပိုပြီး ခက်ခဲလာတယ်ဆိုရင် ဒီ Kubernetes ကိုအသုံးပြုပီး container တွေကို manage လုပ်နိုင်ပါတယ်။တစ်နည်းအားဖြင့် containerized application တွေ run နေတဲ့ node တွေ ကို cluster တစ်ခုအနေနဲ့  ပေါင်းစည်းပေးပြီး management ပြုလုပ်ပေးတာဖြစ်ပါတယ်။

 

What are Kubernete's components? 


                  Kubernetes တစ်ခု ဖြစ်ဖို့ သူ့ကို တည်ဆောက်ပြီး အသုံးပြုဖို့ အတွက် သူ့မှာ components တွေ ရှိပါတယ်။ အဲ့ဒီ Components တစ်ခုချင်းဆီရဲ့ အလုပ်လုပ်ပုံကို ရှင်းပြမှာဖြစ်ပါတယ်။ 



What are the master node and worker node?


             Kubernetes တည်ဆောက်ပုံမှာ အရင်ဆုံး master node ရယ် worker node ရယ်ဆိုပြီး ရှိပါတယ်။ Default အရ Container တွေကို Worker node ပေါ်မှာ ထားပြီး Master node ကနေ manage လှမ်းလုပ်တာဖြစ်ပါတယ်။ Master node ပေါ်မှာလဲ container run လို့ရပါတယ်။

What does the master node do? 


            Master node က worker nodes မှာရှိတဲ့ container တွေကို planning, monitoring, scheduling စသည့် အပိုင်းတွေကို တာ၀န်ယူ လုပ်ဆောင်ပေးပါတယ်။

What makes the node become master? 


            Master node တစ်ခုဖြစ်ဖို့အတွက် သူ့မှာ master node နဲ့သက်ဆိုင်တဲ့ Kubernetes's component တွေပါ၀င်ရပါတယ်။ ဘာ components တွေလဲဆိုတော့ 

  1. Etcd
  2. Kube-Scheduler
  3. Kube-Controller
  4. Kube-API  
စတဲ့ components တွေပါရှိရပါတယ်။ 
         

What makes the node become a worker?


          Worker node တစ်ခုဖြစ်ဖို့အတွက်ကျတော့ သူ့ဆီမှာ 
  1. Container runtime engine တစ်ခု ရှိရမယ် (i.e docker-engine)
  2.  Kubernetes Master node နဲ့ ဆက်သွယ်ဖို့  "kubelet" ဆိုတဲ့ agent တစ်ခု ရှိရမှာဖြစ်ပါတယ်။
  3. Kube-Proxy 


What is Etcd?


         Etcd သည် Kubernetes cluster ရဲ့ relational database တစ်ခုဖြစ်ပါတယ်။ သူက Kubernetes cluster တစ်ခုရဲ့ Key-Value Information တွေ သိမ်းဆည်းရာ နေရာဖြစ်ပါတယ်။ Kubernetes cluster ကနေ containers တွေကို ဘာပဲ လုပ်လုပ် လုပ်လိုက်တဲ့ အရာမှန်သမျှ changes တွေကို ဒီ Etcd မှာသွား ပြီး သိမ်းဆည်းပေးတယ် Update လုပ်ပေးတာဖြစ်ပါတယ်။ 

What is Kube-Scheduler?


        Kube-Scheduler ကျတော့ ကျွန်တော်တို့ container တွေကို ဘယ် worker node မှာ assign ချမယ် ဆိုတာ ကို ဆုံးဖြတ်ပေးတဲ့ တာ၀န်ကို ယူပါတယ်။  အဲ့တော့ သူက worker node ရဲ့ ဘယ်အရာတွေကို ကြည့်ပြီး container တွေကို assign ချလဲ ဆိုတော့ worker node ရဲ့ capacity, resource requirement and တစ်ခြား worker node ပေါ်မှာ container run ဖို့ နဲ့ ပတ်သက်ပြီး ဘာတွေထိန်းချုပ်ထားလဲ ဘာ policies တွေရှိလဲဆိုတာ အရင်စစ်ဆေးပြီးမှ assign ချပေးတာဖြစ်ပါတယ်။

What is Kube-Controller?


           Kubernetes cluster တစ်ခုရဲ့ main component တစ်ခုဖြစ်ပါတယ်။ သူ့မှာ အဓိကအားဖြင့် controller နှစ်ခုရှိတယ်။

1. Node Controller


             Kubernetes cluster အတွင်းမှာရှိတဲ့ nodes တွေကို တာ၀န်ယူရတဲ့ controller ဖြစ်ပါတယ်။ Cluster အတွင်းသို့ node အသစ်ရောက်လာတာ node တွေ down သွားတာ စတာတွေ ကြည့်ပေးရတဲ့ အပိုင်းကို တာ၀န်ယူပါတယ်။

2. Replication Controller


          Replication controller ကျတော့ Kubernetes cluster တစ်ခုမှာ သတ်မှတ်ထားတဲ့ pods အရေအတွက် ပြည့်မှီအောင် တာ၀န်ယူရပါတယ်။ Pod ဆိုတာက Kubernetes terms အရ container တွေထားတဲ့ နေရာဖြစ်ပါတယ်။ 

What is Kube-API Server?


            Kube-API ကတော့ အခု အပေါ်မှာ ပြောခဲ့တဲ့ components တွေ အချင်းချင်း ဆက်သွယ် အလုပ်လုပ်နိုင်ဖို့ front end component တစ်ခုအနေနဲ့ လုပ်ဆောင်ပေးတယ်။ Woker nodes နဲ့ Master node ကြား ဆက်သွယ်ဖို့လဲ တာ၀န်ယူပေးတယ်။ Kubernetes cluster state ကိုလဲ​ monitor လုပ်ပေးပါတယ်။ 

What is the Kubelet agent?


           Kubelet ကတော့ agent တစ်ခု ဖြစ်ပြီး worker node ရဲ့ component တစ်ခုဖြစ်ပါတယ်။ Kubernetes cluster အတွင်းမှာ ရှိတဲ့ node တစ်ခုချင်းစီမှာ kubelet agent တစ်ခုစီရှိပါတယ်။ Kubelet က Kube-API server နဲ့ ချိတ်ဆက်ပြီး container တွေကို manage လုပ်ပါတယ်။


What is Kube-Proxy?


           Kube-Proxy ဆိုတာက တော့ မတူညီတဲ့ Node တွေပေါ်မှာ run နေတဲ့ containers တွေအချင်းချင်း communicate လုပ်နိုင်အောင် ဆောင်ရွက်ပေးတဲ့ component ဖြစ်ပါတယ်။

Last but not least, What is kubectl?


          Kubectl ဆိုတာ က command-line utility တစ်ခုဖြစ်ပြီး Kubernetes cluster တစ်ခုလုံးကို manage လုပ်ရာမှာ အသုံးပြုရမယ့် command-line utility ဖြစ်ပါတယ်။ 


              အခု ပြောပြခဲ့တဲ့ components တွေက Kubernetes cluster တစ်ခုဖြစ်လာဖို့အတွက် လိုအပ်တဲ့ အရာတွေဖြစ်ပါတယ်။ ဒီ Components တွေ ရှိမှသာ Complete Kubernetes Cluster တစ်ခုဖြစ်လာမှာဖြစ်ပါတယ်။


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.