Blog

PRO-TIP: You should use Kubernetes in 2021

EBS Integrator
Jun 25, 2021,

Kubernetes’ use has increased from 27% in 2018 to 48% by the end of 2020! According to VMware’s end of the year report.

Are all the top IT companies transitioning to the microservices architecture? And why Kubernetes seem to be leading in “container orchestration tools”? Let’s find out, this and more in our professional dive-in.

SOFTWARE ARCHITECTURE AND YOU

Before we delve deep into what Kubernetes is, let’s make sure we understand what software architecture is! We’ve discussed the subject before, more than once actually, but nonetheless here’s a small refresher on the topic.

Software architecture is, as the name would imply, the architecture of your software!

Captain Obvious Approves this Message

But it’s more complicated than that. In essence, when you develop, well anything, you must adhere to a “style”, a structure. And as any structure it needs a clear plan of development, the bricks are here, the roof is there, and the communications are yonder. (We’re a software firm, not a construction one!)

Deciphering that: Software demands a complex thought out structure as a finished product. And a strict adherence to a predefined plan during production. This structure compromises software elements, relationships among them, and their properties. It’s important to note that once a plan has been chosen, there’s no going back. Changing mid-production-cycle the whole architecture is incredibly expensive.

We’ve touched upon the different architectural methodologies there are, so we won’t go into that now. But for our current topic, we’ll be choosing the “Microservices Architecture” approach.

 Fun Fact: Google integrated all their systems to container/microservice base in 2014.

AN ARGUMENT FOR MICROSERVICES

There’s a lot of discussion in regard to which architecture is better! But for the sake of the argument, we’ll take the microservices side this time:

Advantages

  • High level of scalability

One of the key advantages of this method is the ability to scale your applications on a whim and amazingly short timeframes, and costs!

  • Well suited for outsourcing

There are hundreds of amazing online resource platforms that provide anything from computing power, host servers, UX/UI development to programming, and everything in between. The word of microservices is compartmentalization so all above can be used interchangeably with your application, swap in, and swap out.

  • Developer team specialization

You can develop parts of your application separately on different timetables and even with different programming languages and specialized teams.

  • Long term over short term approach

Allows easy testing and updates at all stages of development and exploitation cutting costs in the long run, albeit costing a bit more in early production.

Disadvantages

  • Teams need to change their mindset

Even with everyone chasing the latest trend. Understand, up until recently everyone and their dog were most likely thinking in monolithic pattern. Naturally, a transition period must occur. However according to recent studies that may no longer be the case, as the microservices approach takes hold.

  • Complex networks and maintenance

The nature of this methodology is essentially divide and conquer. And if (and when) something goes wrong, it could be difficult to discern what exactly broke and what lead to it.

  • Challenging automation

Due to given complexity of the structure, automatic the system in any shape or form can be difficult if attempted in-house.

  • Modularized functionality

The other side of the coin of compartmentalization. A certain function or service may depend on one or multiple other “instances”. Thus, its relatively easy to lose track and inadvertently break one or more parts of your app.

This is by no means an all-encompassing list. These are however, the ones we’d like to come back to later. No system is perfect, and it’s foolish to think otherwise. But there’s a reason why we chose this architecture.

But first, let’s talk about this lovable fellow:

Docker Cover about Kubernetes

DOCKER

That adorable little whale is the mascot for an open-source platform for building, deploying, and managing our isolated instances. Or as you’ve noticed – containers.

There are quite a few alternatives with their own fascinating stories, like: LXC, Solaris, OpenVZ, FreedBSD, CoreOS rkt, and many other.

Without creating a whole new article within an article about this, or Docker itself (something for the future). Let us just say that it is essentially a toolkit for developers to create, deploy, run, and kill these containers.

Containers are virtual instances much like virtual machines (VM’s) but better almost in every way. And much like VM’s, allow developers to separate different functions of an application in their own little worlds. They are functioning and in contact but isolated from each other.
Making them so much more secure, lightweight, and efficient.

And if you have been following the latest news, you’ll know that Kubernetes is deprecating Docker as of version 1.20. Don’t worry! It sounds more dramatic than it is, and it absolutely doesn’t mean that Docker is going to die off, or is no longer compatible with Kube. There are a multitude of complex reasons for this decision. The gist of it is that Kubernetes is implementing its own CLI (Command line interface) API, Server, volume, and other services, essentially taking over.

Works on my machine meme

But back on topic, one of the key advantages of using this approach is that it avoids the dreaded sentence for many devs: “But it works on my machine!”

We mentioned the complexity involved in microservices as well as Docker and their potential drawbacks. And we did promise that those will be addressed! The time is nigh!

WHAT IS KUBERNETES

Finally! We have all the necessary tools to even begin explaining what Kubernetes is!

Kubernetes (alternatively K8S or “Kube”) is an open-source orchestration tool and container platform rolled into one. What this means is that originally it was used to be the head of the serpent for platforms like Docker, OpenVZ, rkt etc. But as of recent, K8S can be used as one complete system, or a part system reverting to its original “Orchestration” role.

Developed by Google and released to the public in 2014. It was later donated to “Cloud Native Computing Foundation”

But what does it do?

Think of the platform as the main headquarters of your whole application and its container system. Or if you’re so inclined in-house developed or outsourced container system, like Docker.

As we mentioned before we use containers to “hold” a simple function (i.e., “reset your password system”). And we create its own isolated instance with its own allocated resources. Best part is that if by some reason the container crashes, gets deleted, runs out of resources, etc. It automatically restores it by recreation or allocation of more memory. Disaster prevention baby!

It does that by first forming your containers into pods which are then formed into clusters. Monitoring every Kubelet which is exposed to the user. Which is essentially what your end client sees and interacts with.

The platform creates an API master-server, which takes care of scheduling, load balancing and managing of the nodes (Kubeletes). All this with an integrated CLI called “Kubectl”

Kubernetes Architecture

…What? This brief description merely scratches the surface of the subject, and obviously doesn’t explain much. Tell you the truth, Kubernetes is incredibly robust and quite complex.

Next week we’ll help you make heads and tails of all that technical mumbo-jumbo. We’ll walk you through deploying your own service within the Kubernetes playground!

WHY THIS MATTERS

But why should you use Kube? Well, aside the fact that most major IT companies, leading the sail of innovation, have made the transition long ago? More are coming, here’s a projection for 2023.

And Kubernetes is still the leading choice for most IT companies when it comes to managing containers. And with good reason, being among the first platforms in container management, developed on the Google’s model of Borg (later Omega).

We have developers and firms using K8S as a part or a base to create their own platforms like RedHat’s OpenShift or Rancher Labs and other; It all leads to a rich and varied ecosystem, much like Android one. It continues to grow by leaps and bounds.

Kubernetes Ecosystem

Kubernetes is incredibly useful due its modularity and scope which in essence brings us all the advantages of the microservices approach with simplifying or outright solving all the drawbacks!

Its language independent. Have multiple teams working in completely different frameworks and building their own parts of the application in whichever way they want. You need only focus on building highly specialized teams or even outsourcing parts of it to other capable and professional companies.

Kubernetes ensures no downtime for users. One instance falls, the load is balanced out with other nodes. While the tool creates new instances, on rolled back versions if so is needed. The application is always in working condition and is accessible to the end user.

This is also incredibly useful for rolling out updates to one or many parts of your app, without extra costs and or easier timeframes.

FINAL WORDS

Kubernetes is by no means an answer to all your prayers.

Kubernetes Meme Comic

But it sure is amazing, and you should be using it!

“Did you know that roughly 80 percent of all application costs are incurred during operations phase? Don’t worry about the first 8 hours, worry about the next 8 years.” – Craig Mcluckie

This quote perfectly describes the main paradigm that the team at Google took developing the platform. On the outskirt it might sound that going “microservice” is expensive and difficult, and it sure is in the short term. But it pays for itself the in the long term. Not to mention that with 2020 container-based platforms saw a massive rise in popularity and exploitation which in avertedly lowered the cost by the simple rule of “Supply and Demand”

Everybody is jumping on the bandwagon, and you should too! But what do you think? Were we wrong in our brief overview of Kubernetes? We sure hope not! But we’re always open to hear your opinion!

This is a part 1 of 2 on the Kubernetes! Make sure to visit us next week!