1. Single-Container Management Patterns

2. Single-Node, Multi-Container Application Patterns

跨容器设计模式
https://kubernetes.io/blog/20...

* Pod: k8s中创建和管理的、最小可部署计算单元。共享网络、存储

* Container: 容器,资源核算和分配的单元

1) Sidecar Pattern

An extra container in your pod to enhance or extend the functionality of the main container.

使用独立容器,不将功能构建在主容器中的优势

  • 辅助容器在主容器服务不繁忙时使用闲置资源
  • 单独开发测试
  • 辅助容器可作为组件重复利用
  • 容错边界,辅助容器出错不影响主容器服务正常运行
  • 单独发布回滚

2)Ambassador Pattern

A container that proxy the network connection to the main container.

大使模式:通过大使容器帮助应用容器访问外部服务

3)Adapter Pattern

A container that transform output of the main container.

适配器模式:格式化处理主容器的输出

3. Multi-Node Application Patterns

1) Leader Election Pattern

2) Work Queue Pattern

3) Scatter/Gatter Pattern

Reference

https://kubernetes.io/zh/docs...

https://segmentfault.com/a/11...

https://www.usenix.org/system...

https://www.jianshu.com/p/e43...

https://techbeacon.com/enterp...


spoonysnail
80 声望1 粉丝