Kubernetes In 2022
Spread the love

Heck, what is this Kubernetes (K8s) all about?

These days, Kubernetes is a hot buzz word. Any talk around cloud computing and application innovation barely concludes without mentioning it. This led to some common questions like:

  1. Why came a need for Kubernetes?
  2. What is Kubernetes? And is it an alternative to container?
  3. What’s so special about K8s?
  4. When to utilize it (and when not)?

Let’s dive-in to understand what’s the deal with Kubernetes (K8s)?

Background

Today’s world is so fast paced. There is an ever-increasing demand for highly-diversified-applications, to meet the dynamic business needs and to remain competitive. Businesses demand agility, scalability, flexibility, resiliency and cost efficiency for the applications / services.

This increases pressure on the development team for faster development as well as on infrastructure/platform team to facilitate accommodating these changes on faster rate.

Talking about cloud, monolithic applications are more suitable for IaaS (VMs and associated infrastructure). Which may provide some benefits of cloud however this is not where the main benefit of cloud exist.

The true value of cloud (i.e., agility, scalability, flexibility, resiliency and cost efficiency etc.), comes when we start leveraging services based on platform as a service (PaaS), microservices and serverless architecture.

It is an established fact that many (or most) of the existing applications are built keeping traditional architecture models (monolithic architecture), which impose various limitation due to underlying infrastructure.

Why came a need for Kubernetes?

Legacy application development models are not agile to facilitate such demands. Cloud native applications such as Microservices provide promising platform for such exponential growth and faster development.

This is where containers come into picture. Containers are an essential part of a modern application (microservices architecture) which host different functionality of applications decomposed into several different smaller modules.

In simple words, Containers are a modern way to package and deliver the application code without dealing with all the complexity of OS dependencies in a VM. Following diagram illustrates the basic difference between VM and container environment. Key difference to note is the Container Engine and OS layer.

Diagram of VM and container stacks

What is Kubernetes? And is it an alternative to Container technology?

Each application, once decomposed, can split into huge number of containers (10s or even 100s of containers). Hence an organization can easily reach 1000s of containers quickly. Managing such many containers require automation, orchestration, monitoring, load balancing, reporting, resiliency and so on. These functions can be provided by a container orchestration platform: The Kubernetes (K8s).

Exactly!! Kubernetes is not same as container, it is an orchestration platform for containers, originally designed by Google as an open-source project. Now maintained by Cloud Native Computing Foundation.

Kubernetes is required when you need to manage containers at scale. On a high level, it is responsible for:

  1. Deploying images and containers
  2. Managing the scaling of containers and clusters
  3. Resource balancing containers and clusters
  4. Traffic management for services

Kubernetes architecture

A Kubernetes cluster compromises on two major building blocks: Master Node(s) & Worker Node(s).

Master Node is responsible to manage and orchestrate the worker nodes (a single cluster can have 1000s of nodes) using API Server to provide single channels for all the communication/management to rest of the cluster. Cluster’s configuration is maintained in a key-value pair database etcd. Multiple master nodes can be deployed for high availability and resiliency.

Each worker node compromised of one or more Pods which run (usually) one container each. However, in certain cases, multiple supporting containers can be deployed in a single pod.

Supported Container Runtimes

Kubernetes support several common container runtimes such as:

  1. containerd
  2. CRI-O
  3. Docker Engine
  4. Mirantis Container Runtime

What’s so special about Kubernetes?

Kubernetes provides the leading robust platform for building modern applications using microservices architecture, leveraging containers.

Organizations are shifting towards containers, serverless, and Kubernetes at an amazing rate. This swift adoption of microservices architecture can be observed in the CNCF report here: CNCF Sees Record Kubernetes and Container Adoption in 2021 Cloud Native Survey

Kubernetes’ market share dwarfs other orchestrators StackRox, Spring 2019

When to utilize it (and when not)?

Self-managed K8S cluster require thorough understanding and expertise of the Kubernetes technology. Such as

🔹Infrastructure as Code (IaC)
🔹Monitoring & Centralized logging
🔹Centralized Ingress Controller with SSL certificate management
🔹Role-Based Access Control (RBAC)
🔹GitOps Deployments
🔹Secret Management

Managing a Kubernetes cluster requires expertise. Following diagram (courtesy to Pionative) illustrate the generic operations around a Kubernetes cluster.

https://www.pionative.com/post/6-important-things-you-need-to-run-kubernetes-in-production

When Self-managed Kubernetes is best?

Hence if you have in-house experts with knowledge across these areas to deploy, monitor, manage and maintain the Kubernetes cluster(s), it can be a good choice for supporting your modern application development process.

When Managed Kubernetes service is best?

However, if an organization does not have the right expertise to deploy and manage Kubernetes platform then it is highly recommended to opt for the managed service offerings from public cloud.

All major public cloud providers (beside supporting Kubernetes deployment) offer managed Kubernetes service. For example: Azure AKS, Amazon EKS, and Google GKE, OpenShift (a propriety distribution from Red Hat, built on top of Origin Kubernetes Distribution and other open source projects) and Docker Enterprise Edition.

Leveraging managed Kubernetes service is a good idea so that you can focus on rest of the story as illustrated on following diagram (courtesy to Microsoft):

Conclusion

Kubernetes is a great choice (not the only one) for management and orchestration of containerized (or microservices) applications at scale by providing an automation and speedy delivery platform.

Since Kubernetes is available everywhere, any application build on top of it can easily be moved/migrated to another cloud or premises (comparatively) easily. It may be your first (or second) step towards application modernization or cloud journey.

Like with any other technology or solution, it has its own pros and cons. If you are new to Kubernetes platform or does not have an infrastructure that can support it, it would be highly recommended to leverage managed Kubernetes service from public clouds like Azure, AWS, Google or RedHat OpenShift.

Hi, I am Junaid Ahmed - and I am obsessed with all things cloud: infra, apps, data and AI. With an extensive background and expertise (15+ years) around Microsoft technologies, I am an expert on Microsoft cloud, hybrid and on-premises technologies. I have been enjoying consulting organizations in stepping closer to their business goals and visions. Be it digital/business transformation, or optimization, I help organizations in their journey for cloud adoption, application modernization, application enlightnement. My latest craving and enthusiasm is Data Sciences, ML and AI which is keeping me at unrest and helping me to prepare for the next big thing of my professional career. I’m always happy to connect with like-minded people, executives, cloud architects and enthusiasts. Shoot me a message – I look forward to hearing from you!

3 Thoughts on “What on the Earth is Kubernetes”

Comments are closed.