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

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.

主站蜘蛛池模板: 湄潭县| 皋兰县| 德令哈市| 剑河县| 东至县| 甘肃省| 庆云县| 福海县| 苏州市| 泗阳县| 颍上县| 蓝山县| 株洲县| 广丰县| 巴林右旗| 顺昌县| 吴桥县| 汝城县| 无锡市| 成安县| 洪雅县| 屏山县| 资兴市| 原阳县| 札达县| 泗洪县| 南昌县| 房山区| 滨海县| 武清区| 克拉玛依市| 永平县| 常德市| 镇坪县| 延安市| 黔西| 渭源县| 青海省| 汤阴县| 和顺县| 修水县|