当前位置:网站首页>容器网络硬核技术内幕 (7) 大海航行靠舵手
容器网络硬核技术内幕 (7) 大海航行靠舵手
2022-07-27 22:58:00 【用户8289326】
让我们小结一下基于docker引擎的容器网络:
每个docker容器需要连接到网络上,才能对外提供服务,否则其存在没有任何意义。因此,默认在每个宿主机上,有一个docker0网桥,所有的容器默认连接到这个网桥,如下图所示:
如图,172.17.0.2这个容器运行的是ubuntu实例,而172.17.0.3这个容器运行的是nginx实例,二者可以通过docker0互通。
对于访问宿主机以外的网络,需要通过NAT:
当然,对外访问宿主机内部的容器,也需要经过NAT。
对于两台宿主机之间互访的情况,可以利用swarm实现基于VXLAN隧道的互通:
有了这些基础的容器网络机制,我们是可以构建一个基于容器的对外服务系统的。
然而,仅仅有docker引擎,还不够……
-----------------------分割线-----------------------
我们知道,正是中国的几亿劳动者,紧密团结起来,才打败了三座大山、联合国军、血吸虫病和新型冠状病毒。
我们也知道,在linux + docker的体系中,创建容器、销毁容器、将容器连入网络、监控容器性能等操作,都需要手工进行。
如果单一容器无法满足性能或功能的需求,也无法通过自动化的手段自动扩容,或将多个不同功能的容器进行耦合关联。
只有让容器团结起来,才能发挥更大的作用!
DOCKERS OF THE WORLD, UNITE!
一个幽灵,云原生的幽灵,在生产力最发达的中美互联网领域悄悄游荡——
工程师们创立了容器编排平台:Kubernetes。
Kubernetes的字面意义是“舵手”。
Kubernetes可以自动化地调度容器资源,进行容器的创建、入网、扩容和销毁,结合Harbor镜像仓库、Istio API网关、Prometheus性能监控、Jenkins构建流水线等组件,能够实现从代码提交到自动部署的CI/CD(持续集成/持续开发),使得容器真正地驶入蓝海——
大海航行靠舵手!
“舵手” kubernetes 的架构如下:
在如此复杂的架构中,目前我们只需要掌握:
- Kubernetes的容器资源分配单位是pod,一个pod中可以有多个容器,但对pod之外呈现为一个整体(一个IP地址);
- Kubernetes的容器运行载体是node,一个node可以运行多个Pod。node有自己的操作系统(一般为Linux)。
我们可以将node类比为虚拟机世界中的宿主机,pod类比为虚拟机世界中的VM。
下面的讨论均以此为依据。
敬请期待下期——
边栏推荐
- Thesis appreciation [iclr18] a neural language model combining syntax and vocabulary learning
- Swoole Task任务使用
- 力挺吴雄昂!Arm中国管理层发公开信:对莫须有的指控感到震惊和愤怒!
- [proteus simulation] 51 single chip microcomputer washing machine simulation control program
- Use of swarm task task
- Branch and loop sentence exercises
- Swoole协程
- 芯片行业常用英文术语最详细总结(图文快速掌握)
- Array related knowledge
- How to clearly understand and express IAAs, PAAS and SaaS?
猜你喜欢

Examples of application of JMeter in performance testing

Redis缓存穿透击穿和雪崩

浏览器视频帧操作方法 requestVideoFrameCallback() 简介

One year anniversary of creation, Chongba young Lang

Ink wheel salon | Li Wenjie, Peking University: a graph database system for knowledge atlas application gstore

C language programming | explanation and Simulation of offsetof macro

Operator depth anatomy

文件系统挂载

立即报名 | 云原生技术交流 Meetup 广州站已开启,8 月 6 号与你相遇!

Postman download and use tutorial
随机推荐
Wavelet transform learning notes
Detailed explanation of swoole memory table
C language programming | explanation and Simulation of offsetof macro
Recommended system model (III): fine scheduling model [LR, gbdt, wide & deep, DCN, DIN, Dien, MMOE, ple]
Operator depth anatomy
DC motor winding parameters
One year anniversary of creation, Chongba young Lang
Vandermond convolution learning notes
0-1 knapsack problem
LSB steganography
诺基亚宣布与博通合作开发5G芯片
推荐系统-离线召回:u2tag2i、icf
0-1背包问题
【C语言入门】ZZULIOJ 1026-1030
Ink wheel salon | Li Wenjie, Peking University: a graph database system for knowledge atlas application gstore
110. SAP UI5 FileUploader 控件深入介绍 - 为什么需要一个隐藏的 iframe
Node red interacts with tdengine
C语言程序设计 | offsetof宏的讲解及其模拟实现
Jointly create a new chapter in cultural tourism | xinqidian signs a strategic cooperation agreement with Guohua cultural tourism
Unknown database ‘xxxxx‘