This commit is contained in:
2025-12-27 11:44:50 +08:00
commit ccd43fac1f
1193 changed files with 384161 additions and 0 deletions
@@ -0,0 +1,224 @@
---
excalidraw-plugin: parsed
---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠==
# Text Elements
Helm仓库 ^NuN5J43D
Kubernetes集群 ^HuIdFKNq
%%
# Drawing
```json
{
"type": "excalidraw",
"version": 2,
"source": "https://excalidraw.com",
"elements": [
{
"type": "rectangle",
"version": 51,
"versionNonce": 639331558,
"isDeleted": false,
"id": "JWGgRhpUxfQXbE0S_-hDy",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -80.20703125,
"y": -204.60546875,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"width": 167,
"height": 61.34765625,
"seed": 263880506,
"groupIds": [],
"strokeSharpness": "sharp",
"boundElements": [
{
"type": "text",
"id": "NuN5J43D"
},
{
"id": "ePutVgRbK0xgJ8pfN1fJm",
"type": "arrow"
}
],
"updated": 1641827500567
},
{
"type": "text",
"version": 20,
"versionNonce": 2057084198,
"isDeleted": false,
"id": "NuN5J43D",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -75.20703125,
"y": -186.431640625,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"width": 157,
"height": 25,
"seed": 1545550330,
"groupIds": [],
"strokeSharpness": "sharp",
"boundElements": [],
"updated": 1641829157158,
"fontSize": 20,
"fontFamily": 1,
"text": "Helm仓库",
"rawText": "Helm仓库",
"baseline": 18,
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "JWGgRhpUxfQXbE0S_-hDy",
"originalText": "Helm仓库"
},
{
"type": "rectangle",
"version": 134,
"versionNonce": 1864949798,
"isDeleted": false,
"id": "YT5mcsK1LjgTpfvK1TxsM",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -111.265625,
"y": 9.44140625,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"width": 229.265625,
"height": 90.34765625,
"seed": 968510310,
"groupIds": [],
"strokeSharpness": "sharp",
"boundElements": [
{
"type": "text",
"id": "HuIdFKNq"
},
{
"id": "ePutVgRbK0xgJ8pfN1fJm",
"type": "arrow"
}
],
"updated": 1641827500567
},
{
"type": "text",
"version": 91,
"versionNonce": 3512570,
"isDeleted": false,
"id": "HuIdFKNq",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -106.265625,
"y": 42.115234375,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"width": 219.265625,
"height": 25,
"seed": 1904878118,
"groupIds": [],
"strokeSharpness": "sharp",
"boundElements": [],
"updated": 1641829157165,
"fontSize": 20,
"fontFamily": 1,
"text": "Kubernetes集群",
"rawText": "Kubernetes集群",
"baseline": 18,
"textAlign": "center",
"verticalAlign": "middle",
"containerId": "YT5mcsK1LjgTpfvK1TxsM",
"originalText": "Kubernetes集群"
},
{
"type": "arrow",
"version": 27,
"versionNonce": 882509926,
"isDeleted": false,
"id": "ePutVgRbK0xgJ8pfN1fJm",
"fillStyle": "hachure",
"strokeWidth": 1,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"angle": 0,
"x": -1.3789062499999996,
"y": -138.83984375,
"strokeColor": "#000000",
"backgroundColor": "transparent",
"width": 1.9179687500000022,
"height": 138.6875,
"seed": 1453762854,
"groupIds": [],
"strokeSharpness": "round",
"boundElements": [],
"updated": 1641829157163,
"startBinding": {
"elementId": "JWGgRhpUxfQXbE0S_-hDy",
"gap": 4.41796875,
"focus": 0.04988519949075857
},
"endBinding": {
"elementId": "YT5mcsK1LjgTpfvK1TxsM",
"gap": 9.59375,
"focus": -0.06439029252234496
},
"lastCommittedPoint": null,
"startArrowhead": null,
"endArrowhead": "arrow",
"points": [
[
0,
0
],
[
-1.9179687500000022,
138.6875
]
]
}
],
"appState": {
"theme": "light",
"viewBackgroundColor": "#ffffff",
"currentItemStrokeColor": "#000000",
"currentItemBackgroundColor": "transparent",
"currentItemFillStyle": "hachure",
"currentItemStrokeWidth": 1,
"currentItemStrokeStyle": "solid",
"currentItemRoughness": 1,
"currentItemOpacity": 100,
"currentItemFontFamily": 1,
"currentItemFontSize": 20,
"currentItemTextAlign": "left",
"currentItemStrokeSharpness": "sharp",
"currentItemStartArrowhead": null,
"currentItemEndArrowhead": "arrow",
"currentItemLinearStrokeSharpness": "round",
"gridSize": null
},
"files": {}
}
```
%%
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 83 KiB

@@ -0,0 +1,45 @@
### Helm是什么
Helm就是一个K8s的软件包管理工具,相当于centos的yum或是ubuntu的apt-get。所以一个完整的Helm体系就可以概括为:
![[Drawing 2022-01-10 23.10.38.excalidraw]]
当然,Helm的仓库可以有很多供应商,就像yum的仓库有不同的源,阿里的,腾讯的,还有centos官方的,有一些软件,你在阿里上面找不到,但是腾讯的源有。一样的道理。
### Helm软件包 - Chart
在[[kubernetes]]上面运行的,是服务,所以chart就是这些服务运行的定义,例如:
1. 定义应用:
1. 我需要跑一个nginx应用服务,运行一个网站,然后这个应用通过一个80端口向外提供服务。
2. 我需要跑一个spring boot应用服务,提供一些接口,供上面的网站调用。
2. 定义服务
1. 定义一个web服务,后端指向上述nginx应用服务
2. 定义一个api服务,后端指向上述的springboot应用服务
3. 开放服务
1. 通过ingress做域名解析,将web.example.com解析到上面的web服务
2. 通过ingress做域名解析,将api.example.com解析到上面的api服务
### Helm仓库
Harbor,是一个企业级的制品库管理系统,这里说的制品,包括了Docker镜像和Helm包。所以,以harbor为基础,可以搭建一个企业私有的制品发行管理系统。
创医元的Harbor地址为:[创医元harbor](https://harbor.devops.jtgdyyb.cn)
关于Harbor的详细介绍参考[[制品仓库Harbor]]
### HelmCLI
helm官方提供了一个没有比yum看起来更强大的工具,也就是这样一个命令行。
* 查找仓库中的mysql服务
<div style="text-align:center">
<img src="http://thoughts.taotechip.com/uPic/lyz6RO.png"/>
</div>
* 安装mysql服务到集群中
``````bash
$ helm install project_mysql c7n/mysql --namespace test_ns
``````
除了最基本的chart包操作,还有:
1. 制作Chart包
2. 仓库(repo)管理
3. 集群中服务的安装/卸载/升级
4. 发布
可以认为,通过HelmCLI和Harbor我们可以完成一个产品的发行制作与部署、升级等运费的管理操作
#### 安装
@@ -0,0 +1,6 @@
### Kubernetes能做啥?
### 基础组件
### 环境的搭建
@@ -0,0 +1,2 @@
### 容器管理
### 服务应用包