Skip to content

Kubernetes Basics

Kubernetes-architecture

Introduction

Kubernetes is a popular open-source container orchestration tool that helps manage and automate the deployment, scaling, and management of containerized applications. It was initially developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF). Kubernetes is widely used by many organizations to manage their containerized infrastructure efficiently. In this blog post, we’ll discuss the pros and cons of using Kubernetes.

Pros of Kubernetes

Kubernetes offers several benefits to organizations that use it to manage their containerized applications. Here are some of the pros of using Kubernetes:

1. Scalability

Kubernetes provides excellent scalability features that allow organizations to scale their applications quickly and efficiently. Kubernetes can scale up or down based on demand, which helps organizations save costs and resources.

2. High Availability

Kubernetes offers a high level of availability for applications. It provides automated failover and self-healing capabilities, ensuring that applications are always available and running even in the event of hardware failures or other issues.

3. Container Orchestration

Kubernetes automates the deployment and management of containers, making it easier for organizations to manage their containerized infrastructure. Kubernetes offers a wide range of features that simplify container management and allow organizations to focus on developing their applications.

Cons of Kubernetes

While Kubernetes offers many benefits, there are also some downsides to using it. Here are some of the cons of using Kubernetes:

1. Complexity

Kubernetes can be complex and challenging to set up and manage, especially for organizations that are new to containerization. Organizations need to invest time and resources to learn and understand Kubernetes’ concepts and architecture.

2. Cost

While Kubernetes is open source, it requires a significant investment in infrastructure and resources to set up and maintain. Organizations need to have a dedicated team to manage their Kubernetes infrastructure, which may not be feasible for smaller organizations.

3. Learning Curve

Kubernetes has a steep learning curve, which can be challenging for organizations that are new to containerization. Organizations need to invest time and resources to train their teams on Kubernetes’ concepts and best practices.

Components of Control Plane

Let’s delve into the functions of each control plane component in more detail:

  • kube-apiserver: This component serves as a frontend to the control plane and manages all communication within the Kubernetes cluster and from outside to Kubernetes. This communication takes place through APIs, either via the command-line interface (CLI), the user interface (UI), or from the control plane to worker nodes. The kube-apiserver is also responsible for exposing these APIs. It can scale horizontally and across different instances to handle traffic.
  • etcd: etcd is a highly available, strongly consistent key-value distributed data store. Kubernetes uses etcd to store all cluster-related information. When there is a change in a cluster, or a Pod’s etcd gets updated, access to etcd is achieved through the kube-apiserver.
  • kube-scheduler: This component is responsible for placing a new Pod (created using the kube-apiserver with no assigned node) on a worker node. The kube-scheduler makes its decision based on several factors, such as resource requirements, hardware and software constraints, data locality, affinity, and more.
  • kube-controller-manager: This daemon process consists of core control loops and is considered the brain of Kubernetes. It manages the cluster using different controllers, with each controller managing the shared state of the cluster via the API server. Some of the controllers include:
  • Replication controller: Ensures a specified number of Pods are always available in a cluster.
  • Deployment controller: Manages the Kubernetes deployments within your cluster.
  • Namespace controller: Manages the namespaces within a cluster.
  • Node controller: Monitors nodes and responds to unhealthy ones.
  • Job controller: Monitors Job objects and manages Pods to complete those jobs.
  • ServiceAccount controller: Manages the ServiceAccounts inside a namespace.
  • cloud-controller-manager: This control plane component manages the link between your cluster and the cloud provider’s API. It is an optional component that only runs your cloud provider controllers when your cluster has an extension to the cloud. If you are running Kubernetes only on on-prem infrastructure or on your local PC, then the cloud controller manager won’t run a controller.

What is EKS

EKS is a Kubernetes service provided by AWS that manages Kubernetes in both the cloud and on-premises data centers. It oversees the Kubernetes control plane nodes that are tasked with scheduling containers, storing cluster data, maintaining application availability, and providing current information about the cluster.

EKS-architecture

AWS Outposts is a collection of fully managed AWS services that enables the operation of native AWS services in virtually any on-premises or edge location. AWS Outposts allows you to run these services in your data center, connecting to your local AWS Region. This is particularly useful for running application workloads that require low latency to on-premises systems or local data processing. AWS Outposts delivers a true hybrid experience, enabling expansion to on-premises data centers with low latency using the native cloud APIs and services.

Deploying application on EKS cluster

EKS-Pipeline-deployment-architecture

Exporter Summary

Exporter-Summary

Conclusion

Kubernetes is an excellent tool for managing containerized infrastructure, but it’s not without its challenges. Organizations need to weigh the pros and cons of using Kubernetes and determine whether it’s the right tool for their needs. If an organization has the resources and expertise to manage Kubernetes, it can provide significant benefits in terms of scalability, high availability, and container orchestration. However, smaller organizations may find it challenging to invest in the infrastructure and resources required to manage Kubernetes effectively.

Reference

  • https://kubernetes.io/
  • https://helm.sh/
  • https://www.stacksimplify.com/
  • Amar Deep Singh - Building and Delivering Microservices on AWS (2023)
Leave a message