The preparation for the CKA (Certified Kubernetes Administrator) requires lots of practice and practice. Fortunately, we have lots of online playgrounds to keep practicing, there are lots of free courseware available and lots of paid as well are available. In addition to that, we get two attempts to clear the exam
- There is training conducted by the https://training.linuxfoundation.org/ itself who conducts the CKA exams.
- But I felt this course from Udemy is good https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/, it has videos that explain each concept and have lots of practical sessions and mock exams.
- The https://killer.sh/ is another tool where you can practice and the questions asked in the killer.sh are complex and tests real skill. If we subscribe to the CKA exam, we will get two free sessions to solve the problems in the killer.sh
- https://www.katacoda.com/courses/kubernetes this is very useful if you are a beginner in kubernetes. It starts with a very simple usecase/scenario and we can solve in our own pace and try any number of times
- https://killercoda.com/ is another useful online tool that we can use like a playground to solve scenario-based problems
Even though the CKA exam is a performance-based exam, we should know the concepts thoroughly so we can solve the problems for troubleshooting and fixing.
Types of K8S deployment
• Manual from scratch
○ All components will be installed directly in the master nodes as a linux service
• Using kubeadm command
○ All components of master will be running as a pod under kube-system namespace
Two types of Nodes
• Master Node
○ ETCD Cluster - Stores information about the cluster
○ K8S Scheduler - Used to for deploying containers in worker nodes
○ Node Controller -
○ Replication Controller
○ kube-apiserver - for orchestrating communication between services/containers within the cluster
• Worker Nodes
○ kubelet - is a agent runs on each worker node and listens for instruction from master node
○ kube-proxy - is used for communication between containers within worker node or across worker nodes
Containers
• Even the components running in the master node is also runs inside a container
• K8S supports multiple different container runtime engines
○ docker
○ containerd
○ rkt
ETCD
• Distributed reliable key-value store
• Open source and we need to bring up the service by executing the binary
• by default the service comes up in port 2379
• and comes with a default client called etcdctl
ETCD in K8S
• It stores all the details of the cluster like
○ Nodes
○ Pods
○ Configs
○ Secret
○ Accounts
○ Roles
○ Binding
kube-apiserver
• We can use following clients to talk to kube-apiserver
○ kubectl
○ REST APIs
• Eg: when we execute "kubectl get pods", the kube-apiserver receives the commands and checks the etcd cluster and responses
• The kube-apiserver is responsible for
○ Authenticating the user
○ Validating the request
○ Update the ETCD
○ Talks to scheduler, kubelet etc
Controller Manager : kube-controller-manager
• Node controller responsibility is to monitor the node state and keep it healthy
○ checks the health every 5 sec
○ node eviction time is 5 m
○ kubectl get nodes
• Replication Conroller
○ responsible to keep the desired number of pods in node
• Deployment Controller
• Namespace Controller
• Job controller
• Service account controller
• Endpoint controller
• Stateful set
• Cron job
kube-scheduler
• Will decide which pod should be placed in which node and then the kubelet will take care of deployment
• It has some selection criteria in choosing the right pod
○ Filter Nodes
○ Rank Nodes
kubelet
• Registers the node to kubunetes master
• Create POD
• Monitor Node and POD
• kubeadm does not deploy the kubelet service in the worker node
kube-proxy
• Responsible for hosting pods like a service and exposing it through an IP
• It takes care of establishing a connection between pods across multiple different nodes
• It routes traffic using the iptable it maintains
No comments:
Post a Comment