📜 ⬆️ ⬇️

Kubernetes Ice Cream, or Beginner Container Solutions

In fact, Kubernetes and containers came into use quite recently, so it would not be surprising if you still know little about them or are not very actively using them. In this post, we will talk about Kubernetes to those who want to join the avant-garde of IT technologies - developers who have not yet switched to containers, and even non-technical people who today cannot do without IT (hello, digitalization of business!).



Expand the hot topic will help us an example of ice cream.

Ice cream case


Imagine that we produce and sell ice cream, we have a successful business that has recently emerged from pure offline to gaining momentum online. Our team is small, but it already has a few developers we hired to cope with the growing demand.
')
For the first time we started online trading last year, and the corporate website has already managed to raise sales decently. Thanks to the Internet, we can trade not only in our stores, but also deliver goods to almost every corner of the country where there is a delivery. People like our ice cream, and we need to scale to meet demand.

We hired several additional developers to develop and update the site. So that our business could grow further, the developers started creating new applications. In particular, they said that we need a billing system, a temperature monitoring system in the freezers, as well as algorithms to optimize business processes, like “just in time” principle. In general, a lot of everything. And now they said that among other things, we still need some kind of Kubernetes.

We googled Kubernetes and found a bunch of pages about Linux history, some LXC containers, cgroups, and other technical jargon. It did not become clearer. Then we asked the developers to explain why we, simple ice cream makers, need all this tuning, when we already have something to do besides Kubernetes. Well, then, for investment, you need a more compelling reason than just the desire of developers to play around with something new.

One of the developers, Boris, asks if we know how often some function of our site works fine on Alice’s machine, but doesn’t work on his, Boris, machine at all. According to the developers, this happens regularly and is explained by the fact that the environments on the machines of Alice and Boris differ. Containers allow the developer to precisely determine those parts of this environment that are necessary for the proper operation of the application. Due to this, developers save time on debugging problems associated with the mismatch of environments, and can devote more time to the actual development. In addition, containers are easily packaged and moved, in other words, the program code is easily transferred from the developer’s machine to the corporate server.

The developers also emphasize that containers help save money: they weigh little and help to use computational resources more efficiently. In other words, by switching to containers, you can hang more applications on one server.

“Well, fine,” we say. “Let's pack our software in containers.” The developers are responding that they have already begun, since all they had to do was switch to systemd or another initialization system. “Initialization system?” - we ask. Developers say that this is not important, and this system is just needed to manage containers. Then we are interested in when we already get to the sale of ice cream.



In response, we hear that soon we will have to manage hundreds of containers. Hundreds is really a lot. Then the developers return to our original questions: what is Kubernetes? Why do we need it? And how much technology do you need to sell ice cream?

What is Kubernetes?


Kubernetes is a container management tool. If we want to manage hundreds of containers, the best thing to do is through automation. And automation is Kubernetes. Without it, we would have to manually update hundreds of containers every time we roll out a new feature on our website. And we do it all the time! In addition, manual operations are errors. And mistakes in our business are bad, because ice cream tends to melt.

Kubernetes is a container orchestration. In other words, the right way to work with containers when there are a lot of them.

Suppose the container failed and crashed - Kubernetes immediately creates a new one. How does the container know on which computer it should run? The scheduler Kubernetes is responsible for this. Therefore, if we flew a container that monitors the temperature in the freezer, and it must be re-deployed, or it's time to roll out a new version of the corporate site, Kubernetes will be very useful. It seems that it seriously simplifies a lot of tasks for managing all sorts of server-side things in a fast-growing business, like ours.

Then our conversation shifts slightly to the realm of magic. The Kubernetes website mentions self-healing technology. They also write that he is so smart that he can automatically perform sequential updates (rollout) and rollbacks. We read it out loud and ask the developers about it. They answer, and approval is heard in their words: we finally began to ask the right questions. "If you really want to know how the machine works, you need to look at the details."

So, Kubernetes is smart, automated, and easy to interact with. So, solid milk rivers and no pitfalls? And here, developers answer, the most interesting begins. Kubernetes is an open source project. Google started it, laying the foundation for its many years of experience with containers. But now this project has come under the wing of the independent Cloud Native Computing Foundation and is supported by a large community, in which Red Hat, the second active member of the community, also takes an active part. In addition, it is one of the fastest growing projects in the history of the industry .

Kubernetes can work anywhere, from bare iron to clouds, so it will not turn into gold handcuffs. We can use it in any cloud: privately, publicly, or both.

Technological process


Despite the rapid spread in the corporate sector, Kubernetes often turns out to be a tough nut for beginners. It is all about a large number of concepts that need to be learned in order to work with this platform.
How to deal with pod, service and control panel? How to make the service public?

How are running pods updated? To answer most of the questions, we have a special Kubernetes guide that details the basics of this platform.

And also, those who missed the Red Hat webinar on Kubernetes can still see his posting on our page: Container Management in a Distributed Environment webinar .

Any questions? We will try to answer them in the comments.

Based on coreos.com and Red Hat.

Source: https://habr.com/ru/post/354140/


All Articles