Welcome to the episode 4 of “About SWE Weekly” : A Weekly newsletter designed to stay up-to-date on the latest trend in software engineering, covering tech stacks and case studies from SWE world !
This episode will be a tech Deep dive dedicated for Beginners in Kubernetes ! I highly recommend going through our previous docker post if you haven’t already, to make more out of this post.
Introduction to Kubernetes ( K8s ):
Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications ( Routing and handling failure ). It is designed to work with a variety of container runtimes, including Docker, containerd, and CRI-O. Its “RollingUpdate” deployment feature allows updating applications without any downtime!
Here is the K8s roadmap to follow !
⭐ Kubernetes architecture consists of two main logical groups and together they form a cluster.
1: Control plane - this is where K8s system processes that are responsible for scheduling workloads defined by you and keeping the system healthy live.
2: Worker nodes - containers are scheduled and run here.
⭐ How is kubernetes related to microsevices ?
Kubernetes provides a number of features that make it well-suited for deploying and managing microservices. These features include:
Service discovery: Kubernetes can automatically discover and register the services in a cluster. This makes it easy for services to find each other and communicate with each other.
Load balancing: Kubernetes can automatically load balance traffic across the services in a cluster. This ensures that the services are evenly utilized and that the application is available to users even if one of the services is unavailable.
Autoscaling: Kubernetes can automatically scale the services in a cluster up or down based on demand. This ensures that the resources are used efficiently and that the application is always available to users.
Version control: Kubernetes can be used to version control the configuration of the services in a cluster. This makes it easy to roll back to a previous version of the configuration if something goes wrong.
Logging and monitoring: Kubernetes provides built-in logging and monitoring capabilities. This makes it easy to track the performance of the services in a cluster and to troubleshoot problems.
Kubernetes documentation will be your best resource along the journey.
P.S : Refer a friend and unlock exclusive offers waiting for you !
Now some key terminologies :
Pod: A pod is the smallest deployable unit in Kubernetes. It is a logical host for one or more containers and provides them with a shared network namespace and storage volume.
Deployment: A deployment is a Kubernetes workload that manages the deployment and scaling of a set of pods. Hence it is called as controller. The other controllers are jobs, stateful sets, replica sets.
Service: A service is a Kubernetes resource that provides a stable IP address and DNS name for a set of pods. It allows other pods or services to access the pods in a reliable and consistent way ( Routing/ Connectivity ).
● Kubernetes Services explained | ClusterIP vs NodePort vs LoadBalancer vs Headless Service - YouTube
Namespace: A namespace is a way to partition resources in a Kubernetes cluster. It allows multiple teams or projects to use the same cluster without interfering with each other.
ReplicaSet: A ReplicaSet is a Kubernetes resource that ensures that a specified number of replicas of a pod are running at all times. So it handles failure.
ConfigMap: A ConfigMap is a Kubernetes resource that stores configuration data in key-value pairs. It allows you to decouple configuration data from your application code.
Volumes :
● Kubernetes Volumes explained | Persistent Volume, Persistent Volume Claim & Storage Class - YouTube
Helm Charts : A Helm chart is a package of Kubernetes resources that can be used to deploy an application on a Kubernetes cluster. It is a collection of YAML files that describe the Kubernetes resources, such as Deployments, Services, and ConfigMaps. The Helm chart also includes a values.yaml file, which allows you to customize the configuration of the application.
Inorder to touch upon each of these above topics in a practical way, from our next posts, Along with introducing a new technology, I plan to deploy them using YAML files or Helm charts for K8s.
Work Along
To work with Kubernetes locally you would need to install Docker desktop and a k8s Cluster ( either Minikube or Kind ) . Additionally, I found Lens IDE very helpful for managing my k8s cluster. All the links are provided below.
● Install Minikube in Windows 10 via Docker Desktop 2022 Update | 2022 - Version - YouTube
● Managing Kubernetes Clusters with Lens - Best K8s Dashboard & IDE for DevOps - YouTube
Ending note :
We have not seen Helm charts here. This is an important package to deploy your application workloads. As said earlier, this will be covered in our next post. But you can always learn it from here.
https://helm.sh/docs/topics/charts/
Thanks for reading : )