Image for post
Image for post

Getting Started With Kubernetes

Ivan Porta
Dec 27, 2020 · 4 min read

Nowadays, when a client asks to create a highly available distributed system, Kubernetes has become the go-to choice. This resulted in a 69 percent use growth, according to the StackRox 2020 report. This article will give you a quick overview of Kubernetes. It’ll explain which problems it solves, how it works, and what its main components are. The concept behind Kubernetes is strictly related to Microservices, so I will summarize that as well to give you a bit of context.

Microservices

Imagine this scenario: Your company has decided to develop a new social network. After a detailed analysis of the customer needs, your team starts development and, once completed, the application is published. The project is a huge success, and the application grows. Bug fixes are alternated with the building of new features, and with each release the application becomes more intractable and delicate. Your team starts feeling fatigued from outages, anxious about releasing, and generally feel like they can’t deliver new features or fixes fast enough. You might be familiar with the expression, “If it works, don’t touch it.” This fear of change is related to a lack of flexibility that we usually find in Monolithic architectures. To our rescue comes the microservices architecture. This architecture breaks down a monolithic application into small, independently running components decoupled from each other. Each component is a microservice. This approach makes the entire system more maintainable and easier to adjust to today’s rapidly changing business requirements. Each piece can be developed, deployed, updated, and scaled individually, but they all work together with other pieces as part of running a stable and business-critical application.

With great power comes great responsibility.

While microservices make your application flexible and more stable, the entire system also becomes more challenging to configure and manage as their number increases.

This is where Kubernetes comes in. Kubernetes is a software system that hides the details of resource management, monitoring, and failure handling so its developers can focus on application development. Kubernetes adds a layer of abstraction by exposing the entire hardware infrastructure as a single resource. Doing so simplifies the development, deployment, and management of both development and operations teams. The system is composed of:

  • Master node

The master node

This node hosts the control plane of the Kubernetes which controls and manages the entire Kubernetes system and consist of the following components:

  • Kubernetes API Server: The API that handles the communication between the control plane components and external clients.

Worker nodes

The worker nodes are machines that run the deployed applications. These nodes are composed of:

  • Container runtime: Software that executes containers and manages container images on a node. For example: Docker and rkt.
Image for post
Image for post
Components of a Kubernetes cluster

How does Kubernetes work

The workflow to run an application in Kubernetes is as follows:

  • A developer packages the application into one or more container images.

Once the application is running, Kubernetes continuously ensures that the deployed state of the application always matches the provided description. If one of those instances stops working, Kubernetes will restart it automatically.

Image for post
Image for post
Kubernetes overview

References

The Startup

Medium's largest active publication, followed by +756K people. Follow to join our community.

Ivan Porta

Written by

Microsoft Certified DevOps Engineer Expert | MCT | .NET Developer | Public Speaker

The Startup

Medium's largest active publication, followed by +756K people. Follow to join our community.

Ivan Porta

Written by

Microsoft Certified DevOps Engineer Expert | MCT | .NET Developer | Public Speaker

The Startup

Medium's largest active publication, followed by +756K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store