官术网_书友最值得收藏!

  • Learn OpenShift
  • Denis Zuev Artemii Kropachev Aleksey Usov
  • 370字
  • 2021-08-13 16:03:54

Container Runtime and Container Runtime Interface

Before we start with CRI-O, we need talk about the basics. The best place to start will be container runtimes. We already know what containers, Docker, and Kubernetes are. But how does this all work on a low level? The following diagram illustrates a high-level overview of the communications between Kubernetes and containers:

Kubernetes-to-container communications

As you can see, it is not just Kubernetes talking to the container directly. There are two additional layers in the diagram. Let's discuss why we actually need them:

  • Container Runtime: Each and every container technology, such as Docker, Rkt, or Windows Containers, has its own runtime. In short, Container Runtime is a set of scripts and software tools to run and maintain the work of a container.
  • Container Runtime Interface (CRI): As the name implies, CRI is an interface, or a shim layer between Kubernetes and Container Runtime, if you like.

You may ask yourself, Why do I need CRI? Why can't Kubernetes talk directly to Container Runtime?. Imagine that Kubernetes and Container Runtime are a manager and an employee that speak English. No issues here. But imagine that there's a new employee—he's an expert in his field and has been contracted by an organization, so now they have to work with each other. However, this new employee speaks only Russian. Now we have a problem. Now, we need to start adding more and more employees speaking languages other than English. You can see where I'm going. In our case, we have a few solutions to this problem:

  1. The manager has to learn a new language every time there is a new employee speaking a new language
  2. An employee has to learn English
  3. Hire an interpreter for every language that new employees speak
  4. Hire an interpreter that speaks a universal language

Try to answer this question—what are the most efficient options out of the four that have been listed? I hope it makes sense that option 4 is the most efficient one. For the same reason, CRI and then CRI-O was born. Following the preceding analogy, CRI is option 3 and CRI-O is option 4 in the preceding example.

主站蜘蛛池模板: 神池县| 会宁县| 文山县| 舟山市| 聊城市| 镇江市| 五原县| 滨海县| 清水河县| 北票市| 交城县| 盐亭县| 新建县| 福贡县| 鱼台县| 岫岩| 荔浦县| 岚皋县| 永寿县| 武冈市| 兴隆县| 湖南省| 卓尼县| 全州县| 合肥市| 浦城县| 宜都市| 兰溪市| 微博| 田林县| 甘南县| 咸阳市| 松滋市| 即墨市| 广宗县| 舞阳县| 大兴区| 祁阳县| 黑山县| 石棉县| 建水县|