Skip to main content

Command Palette

Search for a command to run...

Journey to KUBERNETES

Updated
6 min read
Journey to KUBERNETES
A

I'm a DevOps magician, conjuring automation spells and banishing manual headaches. With Jenkins, Docker, and Kubernetes in my toolkit, I turn deployment chaos into a comedy show. Let's sprinkle some DevOps magic and watch the sparks fly!

10 Steps Kubernetes Learning Path

What can be achieved by using Kubernetes

  • It provides auto-scalable containerized infrastructure

  • It provides Application-centric management

  • Highly available distributed system

  • It is made to be portable, and enable updates with near-zero downtime, and version rollbacks.

  • Clusters with ‘self-healing’ capabilities when there is a problem

  • Load balancing, auto-scaling, and SSL can easily be implemented

  • Environment consistency across development testing and production

  • Loosely coupled infrastructure, where each component can act as a separate unit

One of the key components of Kubernetes is, that it can run applications on clusters of physical, virtual, and cloud infrastructure as well. It helps in moving from host-centric infrastructure to container-centric infrastructure.

What is Kubernetes

Kubernetes(K8s) is an open-source containerization orchestration tool that helps you to orchestrate and manage your containers infrastructure on-premises or in the cloud.

The purpose of K8s is to host an application in the form of containers in an automated fashion, so that we can easily deploy as many instances of our application as required and enable communication between different services within the application.

So, you will be thinking why we call it K8s?

Basically when you count the number of letters in Kubernetes, between K and S there are 8 letters. So, as a short form, we write K8s instead of writing Kubernetes as a whole. (Basically to save time😄)

• Most of the companies if not all directly or indirectly have their workloads hosted over Kubernetes.

• Initially developed by Google, for managing containerized applications in a clustered environment but later donated to Cloud Native Computing Foundation (CNCF) and Written in Golang

Why is Kubernetes so hot?

Though its popularity is mostly a recent trend, the concept of containers has existed for over a decade. However, it was Docker which has demonstrated that containerization can drive the scalability and portability of applications for development and IT operations teams. They have become an integral part of building automation continuous integration and continuous deployment (CI/CD) pipelines.

The solutions that are already containerized can drastically reduce development time spent on operations and deployment.

It speeds up the overall software and application development process by making easy, faster, automated deployments, and updates to running applications with almost zero downtime.

Docker vs Kubernetes

Docker is a containerization platform that packages your application code, its dependencies, and libraries into something known as containers. These containers can run on any platform or operating system that supports docker.

For a full-fledged application, you will have multiple containers for various components like frontend, backend, database, monitoring, logging and so much more. Managing these containers can be a challenging process, so you will require a container orchestration tool such as Kubernetes

Kubernetes is an open-source container orchestration tool that manages multiple containers. Kubernetes helps with tasks like scaling up and down, making sure that your application is running smoothly all the time.

What are the benefits of using K8s?

Some of the main benefits of using Kubernetes include:

  1. Scalability: Kubernetes makes it easy to scale applications up or down by adding or removing containers as needed. This allows applications to automatically adjust to changes in demand and ensures that they can handle large volumes of traffic.

  2. High availability: It automatically ensures that applications are highly available by scheduling containers across multiple nodes in a cluster and automatically replacing failed containers. This helps prevent downtime & ensures that applications are always available to users.

  3. Improved resource utilization: Kubernetes automatically schedules containers based on the available resources, which helps to improve resource utilization and reduce waste. This can help reduce costs and improve the efficiency of your applications.

  4. Easy deployment & updates: It makes it easy to deploy & update applications by using a declarative configuration approach. This allows developers to specify the desired state of their applications & it will automatically ensure that the actual state matches the desired state.

  5. Portable across cloud providers: It is portable across different cloud providers, which means that you can use the same tools & processes to manage your applications regardless of where they are deployed. This can make it easier to move applications between cloud providers.

  6. Auto-Healing: K8s automatically detects and replaces failed containers, improving application reliability.

  7. Service Discovery and Load Balancing: It handles routing traffic to the right containers and balances the load, ensuring even distribution.

  8. Security: Kubernetes provides tools for managing secrets, controlling access, and enforcing network policies to enhance application security.

  9. Declarative Configuration: You define your application’s desired state, and K8s ensures that state is maintained, reducing manual configuration.

Swarm vs Kubernetes:

Both Kubernetes and Docker Swarm are important tools that are used to deploy containers inside a cluster but there are subtle differences between the both

FeaturesKubernetesDocker Swarm
Installation & Cluster ConfigurationInstallation is complicated; but once setup is done, the cluster is very strongInstallation is very simple, but the cluster is not very strong
GUIGUI is the Kubernetes DashboardThere is no GUI
ScalabilityHighly scalable & scales fastHighly scalable & scales 5x faster than Kubernetes
Auto-ScalingKubernetes can do auto-scalingDocker Swarm cannot do auto-scaling
Rolling Updates & RollbacksCan deploy Rolling updates & does automatic RollbacksCan deploy Rolling updates, but not automatic Rollbacks
Data VolumesCan share storage volumes only with other containers in the same PodCan share storage volumes with any other container
Logging & MonitoringIn-built tools for logging & monitoring3rd party tools like ELK should be used for logging & monitoring

The Most Common Kubernetes Terms

🕸Nodes: A node is a physical or virtual machine that runs containers.

🕸Pods: A pod is the smallest deployable unit in Kubernetes. It contains one or more containers, shared storage, and network resources.

🕸ReplicaSet: A ReplicaSet ensures that a specified number of replicas of a pod are running at any given time.

🕸Deployment: A deployment provides declarative updates for Pods and ReplicaSets.

🕸Service: A service provides a stable IP address and DNS name for a set of pods.

🕸Ingress: Ingress is a set of rules that allows inbound connections to reach the cluster services.

🕸ConfigMap: A ConfigMap is used to store configuration data as key-value pairs.

🕸Secret: A Secret is used to store sensitive information such as passwords and API keys.

🕸Volume: A Volume is a directory that contains data accessible to the containers in a pod.

🕸Namespace: A Namespace provides a way to organize and isolate resources in a cluster.

🕸HorizontalPodAutoscaler: A HorizontalPodAutoscaler automatically scales the number of pods in a replication controller, deployment, or replica set based on observed CPU utilization or other metrics.

🕸StatefulSet: A StatefulSet manages the deployment and scaling of a set of pods and provides guarantees about the ordering and uniqueness of these pods.

🕸DaemonSet: A DaemonSet ensures that all nodes in a cluster run a copy of a pod.

🕸Job: A Job creates one or more pods and ensures that a specified number of them successfully terminate.

🕸CronJob: A CronJob creates a job on a schedule, similar to a Unix cron job.

These are just some of the important terms in Kubernetes, and there are many more that can be used to build and manage containerized applications.

More from this blog

Ashwin's Blog

108 posts

Journey to KUBERNETES