Kubernetes: The revolution in the deployment of business applications

Kubernetes is a technology developed by Google a few years ago for use within the company itself. In 2014 it was released as open source and has since become an industry standard in the technology industry. This tool has revolutionised the way companies deploy and manage their applications on a large scale, as it provides much greater flexibility, scalability and efficiency than previously used methods. Personally, I am very fond of this technology, since until recently it was very unknown and knowing how to work with it has opened many doors for me. My objective in this article is to share a brief introduction to understand what it does and why it has represented an important advance with respect to what was done a few years ago.

Diego Martín Follow

Reading time: 6 min

What is Kubernetes?

Kubernetes is an open source (public and free) platform for deploying and managing applications that have been deployed in containers.

But first of all, what does this mean and what are containers?

To understand it more easily, let’s imagine it as a city in which we have two types of housing: apartments and detached houses.

  • The apartments (containers) are buildings whose inhabitants share resources (water, electricity, gas…) and each of the apartments uses only what it needs and pays its share, but it could be the case that everyone is using the shower and he cannot take a shower because there is not enough water in the building.
  • The independent houses (virtual machines), let’s imagine, have to pay in advance each month for what they are going to use. The positive part is that the owners know that they have some resources reserved for them, but the monthly cost is the same even when they are away from home.

Depending on the intended use, one type of housing may be more suitable than another, but let’s imagine that we could combine the best of both cases, and that the water, electricity and gas used in the homes would be allocated automatically and each person would only pay for what they wanted.

That’s Kubernetes: a platform for deploying applications, and at the same time controlling and managing them.

Sounds good, doesn’t it?

Before we go any deeper into how it works, let’s understand the difference between an apartment and a house, following our example:

Virtual machines

For years, companies have used virtual machines for their applications. In this approach, a server runs several ‘virtual computers’, and each one has its own operating system, allocated memory, CPU, etc. In this way, applications can be segmented within the same server.

It’s like having several independent computers within one, each with its own allocated resources. Although this technique gives good results, it has some limitations:

  • Each virtual machine needs an operating system, which consumes a lot of resources.
  • Start-up and management are usually quite slow and cumbersome.
  • Moving virtual machines between servers is very slow due to their size.

The advantage is that we know that each application that has been mounted on a virtual machine has specific resources allocated to it, but on the other hand the following questions arise:

  • What if it has more resources allocated to it than it needs?
  • What if this application only works for an hour a day to do things? The rest of the time it is wasting the company’s

As you can see, although this method can work, in some cases of use it is not the most efficient…

Containers

Containers, however, take a slightly different approach. Instead of creating an entire virtual computer, it creates isolated environments (the containers) which in this case share the same operating system and computer resources, but which are independent of each other.

Containers, unlike virtual machines, are:

  • Much lighter as they do not need to have a ‘complete computer’ and use only what you need
  • They start up much faster
  • They are easily portable: they can run in any environment that supports containers

And this is where Kubernetes comes in: while containers on their own are useful, Kubernetes adds a layer of management and orchestration (it creates and deletes them) that makes them really powerful in enterprise environments.

The advantages of using Kubernetes

Now that we understand this, we can go a little deeper into understanding the advantages of using this platform, as opposed to using virtual machines or containers on their own, taking it a step further:

Greater efficiency in resource allocation

Containers share resources and use only what they need, optimising the use of computer resources.

However, if we have an application that requires a lot of power, we can reserve minimal resources for it. That is to say, it will have a space of the CPU or memory saved only for itself, although if it needs something more it can use all that is available.

As many applications as you need

Within Kubernetes you can run as many application containers as you need. You just have to make sure that there are enough resources for everyone.

Container monitoring

Kubernetes continuously monitors all the containers it has. If at any time one stops working, it deletes it and restarts it, configuring it from scratch. This avoids the need for someone to be watching what is happening and fixing things (which, from experience, are often fixed by switching it off and on again).

Automatic scalability

One of the most notable advantages of Kubernetes is its ability to automatically scale applications according to demand. If a service receives a sudden increase in traffic, Kubernetes can create more instances (more of the same containers) of that service in a matter of seconds to handle the increase.

High availability and fault tolerance

The term high availability is used when you have several machines with the same application, and you can distribute the workload between them.

Sometimes this is more interesting than having a single more powerful one, since this way, if one fails, the rest will continue to work as if nothing had happened.

In Kubernetes, several identical containers are set to work, and the work is distributed among them. If one stops working, the work is distributed among the rest until the failed one is restarted, thus making it fault-tolerant

Easily portable

Kubernetes can be deployed on any computer and on the main cloud providers such as Google, Azure, AWS… It is easy to find a place to use it.

Conclusion

In a world where immediacy and agility are such competitive factors, tools like Kubernetes are bringing capabilities that were previously only available to be used by technological giants like Google, thus allowing other organisations, including Telefónica, to operate with the same levels of efficiency and flexibility.

If you have read this far, you now understand the origin, purpose and basic functioning of one of my favourite technologies, and also one of the most in-demand.

I hope you have found this article interesting and useful in discovering and understanding this technology that is transforming the way companies operate.

Share it on your social networks


Communication

Contact our communication department or requests additional material.

Background formBackground form mobile

Subscribe to Telefónica's blog

For example, [email protected]

close-link