问题描述
我想知道
使用 gVisor 进行沙箱
我需要 gVisor 吗?
没有.如果您正在运行生产工作负载,请不要考虑它!现在,这是一个比喻性的科学实验.这并不是说您可能不想在它成熟时使用它.我对它试图解决进程隔离的方式没有任何问题,我认为这是一个好主意.在将来采用这项技术之前,您还应该花时间探索一些替代方案.
我想在哪里使用它?
作为操作员,您需要使用 gVisor 来隔离不完全受信任的应用程序容器.这可能是您的组织过去信任的开源项目的新版本.它可能是您的团队尚未完全审查的新项目,或者您不能完全确定可以在您的集群中信任的任何其他项目.毕竟,如果您正在运行一个不是您(我们所有人)编写的开源项目,那么您的团队肯定没有编写它,因此如果有的话,正确隔离和保护您的环境将是良好的安全性和良好的工程可能是一个未知的漏洞.
进一步阅读
我的回答包含来自以下来源的信息,这些信息在按原样"采用时位于 引用 部分:我推荐他们进一步阅读:
- 什么是 gVisor? 来自 Rancher 博客
- 使容器更加隔离:沙盒容器技术概述
- 容器、安全和回声室博客作者:杰西·弗雷泽尔
- 真正的遏制成本:gVisor 案例研究
- Kata 容器与 gVisor?
- Firecracker:无服务器应用程序的轻量级虚拟化来自 AWS 的论文
- gVisor 安全基础知识 - 第 1 部分 来自 gVisor 博客
I would like to know if there is a difference between gVisor and Weave Ignite in terms of their use-cases (if there is any). To me, both of them seem to try a similar thing: make the execution of code in virtualized environments more secure.
gVisor is doing this by introducing runsc
, a runtime that enables sandboxed containers and Ignite is doing it by using Firecracker, which in their context also seems to be used as a sandbox.
Both Firecracker and gVisor are technologies which provide sandboxing / isolation but in a different way.
- Firecracker (orange box) is a Virtual Machine Manager.
- gVisor (green box) has an architecture which controls/filters the system calls that reach the actual host.
Weave Ignite is a tool that helps you use Firecracker in order to run containers inside lightweight VMs and also do that with a nice UX, similar to using Docker.
This is also mentioned in the Scope section of github.com/weaveworks/ignite
Regarding the use-case part of your question, it's my feeling that because of the stronger isolation VMs offer, Ignite can be more production-ready. Also, the approach of gVisor seems to have a significant performance cost, as it is mentioned at The True Cost of Containing: A gVisor Case Study:
Further reading
My answer has information from the following sources which are in quote sections when taken "as-is" and I recommend them for further reading:
- What is gVisor? from Rancher Blog
- Making Containers More Isolated: An Overview of Sandboxed Container Technologies
- Containers, Security, and Echo Chambers blog by Jessie Frazelle
- The True Cost of Containing: A gVisor Case Study
- Kata Containers vs gVisor?
- Firecracker: Lightweight Virtualization for Serverless Applications paper from AWS
- gVisor Security Basics - Part 1 from gVisor blog
这篇关于Ignite 和 gVisor 在用例方面有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!