The Layman’s Guide to Kubernetes: Understanding Containerization and More

Varsha Das
Javarevisited
Published in
10 min readApr 4, 2023

When I started working on Kubernetes,I went through dozens of Youtube videos and official kubernetes documentation and various blogs.

However, I quickly realized that much of the language used was complex and hard to understand. I felt frustrated that there wasn’t enough content available that explained Kubernetes in simpler terms, like you might use when talking to a curious 15-year-old.

That’s why I’m excited to share this article with you all, where we’ll be exploring Kubernetes from scratch and answering some of the most essential questions about Kubernetes in simple, layman language.

My goal in writing this article is to make Kubernetes more accessible to everyone, regardless of their experience level.

So, whether you’re a seasoned Kubernetes pro or just getting started, I invite you to join me on this journey as we dive into the exciting world of Kubernetes together!

Let’s talk about the origin:

The name Kubernetes originates from Greek, meaning helmsman or pilot.

K8s as an abbreviation results from counting the eight letters between the “K” and the “s”.

Google open-sourced the Kubernetes project in 2014.

First things first

Here is a list of some of the prerequisite terms that are useful to know when learning Kubernetes:

  1. Containers (covered in this article): Understanding what containers are and how they work is essential for working with Kubernetes. Docker is a popular containerization technology that is commonly used with Kubernetes.
  2. Container Orchestration(covered in this article): Knowledge of container orchestration, including how it works and why it’s important, is essential for understanding the role of Kubernetes.
  3. Cloud Computing: Understanding the basics of cloud computing, including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS), is essential for understanding how Kubernetes is used in cloud environments.
  4. Networking: Familiarity with networking concepts, such as IP addressing, routing, load balancing, and firewalling, is important for working with Kubernetes.
  5. Linux: Knowledge of Linux commands and system administration is essential for working with Kubernetes, as most Kubernetes deployments run on Linux.
  6. Git: Understanding Git and version control concepts is essential for managing code and configuration files in Kubernetes.
  7. YAML: Understanding YAML syntax and how to write YAML files is important for working with Kubernetes configuration files.
  8. REST API: Familiarity with the concepts of Representational State Transfer (REST) and the Kubernetes API is important for working with Kubernetes programmatically.
  9. DevOps: Familiarity with DevOps principles and practices, including continuous integration and continuous deployment (CI/CD), is important for understanding how Kubernetes fits into modern software development and deployment workflows.
  10. Microservices: Knowledge of microservices architecture and design patterns is important for understanding how Kubernetes can be used to manage and scale microservices-based applications.

What is kubernetes?

Kubernetes is :

open-source

container orchestration platform.

written in Go programming language

originally developed by Google, but is now maintained by the Cloud Native Computing Foundation (CNCF).

Open-source refers to a software development model where the source code of a software application is made freely available to anyone to view, use, modify, and distribute.

Explain orchestration, container orchestration, orchestration platform in simple words?

The literal meaning of orchestration is “the arrangement and coordination of a complex interdependent system or group of things”. The term originally comes from the world of music, where orchestration refers to the arrangement of musical instruments and voices to create a specific sound or mood.

In the context of software, "orchestration" refers to the automated coordination and management of complex systems or applications.

It involves the deployment, configuration, and coordination of multiple components, such as servers, containers, and databases, to ensure that they work together smoothly and efficiently.

Example:

Imagine you have a lot of boxes that you need to move from one place to another. Each box has something different inside, and you need to make sure that they all get to the right place, in the right order, and at the right time. That’s a lot to keep track of, right?

Now, imagine that instead of boxes, you have a bunch of small containers, like the ones you might use to pack your lunch. Each container has a different part of a big machine inside, and you need to make sure that all the containers work together to run the machine properly.

That’s kind of like what container orchestration is. It’s a way of managing all these containers so that they work together smoothly and efficiently. It helps you keep track of which container is where, how many you need, and how to get them to work together to run your application or service.

So, now what is an orchestration platform?

Kubernetes is an orchestration platform.

A software tool or service that automates and manages the deployment, configuration, and coordination of complex distributed systems or applications.

Provides a framework for managing the entire lifecycle of the application,

Allowing developers to focus on writing code rather than worrying about infrastructure details.

It provides a central control point for managing various components of the system, such as servers, containers, virtual machines, databases, storage systems, and networking.

Why Kubernetes came into being?

With the widespread adoption of containerization technology, comes the challenges of managing containerized applications at scale.

Containerization what?

Think of it like a virtual container that holds everything needed for the application to run, such as code, dependencies, and configuration files. This container can then be easily moved from one computer to another or run on a cloud server.

(Remember the boxes example in previous example, suppose now you have 1000 boxes to manage?)

As the number of containers grew, it became increasingly difficult to manage them manually.

That’s where Kubernetes comes in.

To help developers manage the growing complexity of containerized applications.

Here are three of the top problems that Kubernetes helps to address:

Deployment and Scaling:

Kubernetes automates the deployment and scaling of containerized applications, allowing developers to focus on writing code rather than worrying about infrastructure details. Kubernetes provides features such as automatic load balancing, self-healing, and rolling updates (more on this later) to ensure that applications are always available and running smoothly.

Resource Utilization:

Kubernetes helps to improve resource utilization by allowing applications to scale up or down based on demand. This helps to ensure that resources are used efficiently, minimizing waste and reducing costs.

Portability:

Kubernetes allows applications to run on any infrastructure that supports containers, making it easy to move applications between on-premises and cloud environments. This helps to provide greater flexibility and avoids vendor lock-in, allowing organizations to choose the infrastructure that best meets their needs.

What is the relationship between Kubernetes & Docker ?

Kubernetes and Docker are both tools used in the development and deployment of software applications, but they serve different purposes.

Docker is like a lunchbox where you put your food and snacks so you can take them with you wherever you go. It’s a way of packaging your stuff so it’s easy to carry around.

Kubernetes is like a big truck that helps you move lots of lunchboxes from one place to another. It’s a way of managing lots of different lunchboxes and making sure they all get to where they need to go.

In other words, Docker is a tool that helps you package and distribute your software applications, while Kubernetes is a tool that helps you manage and run those applications at scale. They work together to make it easier for developers to build and deploy complex applications.

Explain differences between Docker Swarm and Kubernetes?

Docker Swarm and Kubernetes are both tools used to manage and deploy containers in software applications.

Docker Swarm is like a team of ants working together to carry food back to their nest. It’s a way of coordinating a group of containers and making sure they are all working together to deliver the application.

Kubernetes is like a traffic controller at a busy intersection. It’s a way of managing lots of different containers and making sure they are all going where they need to go without getting in each other’s way.

Docker Swarm is a simpler tool that is easier to set up and use for smaller applications, while Kubernetes is a more complex tool that is better suited for larger, more complex applications that need to run across multiple servers.

Kubernetes is a more advanced container orchestration platform that offers more features and scalability than Docker Swarm.

What are the components of Kubernetes?

Containers are like little packages of code that can run your software, and Kubernetes helps you manage a lot of containers at once.

Kubernetes has two main parts: the Master and the Nodes.

The Master is like the brain of Kubernetes. It manages the state of the cluster and makes decisions about what containers should be running where. It’s made up of a few different parts:

  • The API server is like the control center for Kubernetes. It receives requests from users and other components, and sends back information about the state of the cluster.
  • The etcd is like a database for Kubernetes. It stores the configuration data for the cluster, such as the details of the containers and the state of the system.
  • The scheduler is like a traffic controller. It decides which node in the cluster should run each container, based on factors like resource availability and workload balancing.
  • The controller manager is like a task manager. It checks the state of the cluster and makes changes to ensure that the desired state is maintained.

The Nodes are like the worker machines in the cluster. They run the containers and provide the computing power for your applications. They’re made up of two parts:

  • The kubelet is like a supervisor for the containers on the node. It ensures that the containers are running and healthy, and reports back to the Master about their status.
  • The kube-proxy is like a network manager. It handles the network traffic between the containers and other resources in the cluster, such as services.

Can you describe the different types of Kubernetes objects and how they are used in a Kubernetes cluster? Provide examples.

Kubernetes objects are like building blocks that we use to manage and operate our applications in a Kubernetes cluster.

There are different types of Kubernetes objects, like Pods, Deployments, Services, ConfigMaps, and Secrets.

  1. Pods are the smallest and simplest Kubernetes objects, and they represent a single instance of an application. It can be thought of as the smallest unit of deployment in Kubernetes, and it represents a single container or a group of tightly coupled containers that share resources and network space.

Example:

Let’s say we have a simple web application that consists of a single container running a web server. We want to deploy this application to a Kubernetes cluster to ensure that it is always running, and that it can be scaled up or down as needed.

To do this, we could define a Pod in Kubernetes that contains our web server container.

2. Deployments are used to manage groups of Pods, so we can tell Kubernetes how many replicas of an application we want to run, and Kubernetes will make sure that the correct number of Pods are running at all times.

Example:

If we only deploy a single Pod, it would be difficult to ensure high availability and reliability of our application. If the Pod fails, our application would go down.

Let’s say we define a Deployment in Kubernetes with a desired replica count of three. This means that we want Kubernetes to ensure that there are always three Pods running our web application. If one of the Pods fails, Kubernetes will automatically create a new Pod to replace it, so we always have three running Pods.

3. Services provide a stable network endpoint for accessing a group of Pods, so we can expose our application to the outside world.

Example:

We now have a group of identical Pods running our web application managed by a Deployment. Each Pod has its own IP address within the Kubernetes cluster, but these IP addresses are dynamic and can change over time(because pods may get killed and replaced by new pods).

If we want to expose our web application to the outside world, we need a way to provide a stable network endpoint that can be accessed by external clients. This is where a Service in Kubernetes comes in.

4. ConfigMaps and Secrets are used to store configuration data and secrets, respectively, so that we can manage our application’s settings and sensitive information in a secure way.

Example:

We may have configuration data such as database connection strings, API keys, and other settings that need to be managed separately from our application code. We also may have sensitive information such as passwords or encryption keys that need to be kept secure.

We can create a ConfigMap in Kubernetes that stores the database connection string as a key-value pair, and then inject it into our application’s containers as an environment variable.

A Secret, on the other hand, is a Kubernetes object that allows us to store and manage sensitive information, such as passwords or encryption keys.

That’s all for today.

If you found this format helpful, kindly share your feedback in the comments section below. We would love to hear from you if you would like us to publish more articles in this style.

Thanks for reading.

If you liked this article, please click the “clap” button 👏 a few times.

It gives me enough motivation to put out more content like this. Please share it with a friend who you think this article might help.

Subscribe here to receive alerts whenever I publish an article.

If you enjoyed reading this, you could buy me a coffee here.

Connect with me — Varsha Das | LinkedIn

Follow my Youtube channel — Code With Ease — By Varsha, where we discuss Data Structures & Algorithms.

Happy learning! 😁

--

--

Varsha Das
Javarevisited

"Senior Software Engineer @Fintech | Digital Creator @Youtube | Thrive on daily excellence | ❤️ complexity -> clarity | Devoted to health and continuous growth