Skip to content

Commit a8e2ec1

Browse files
committed
2025-5-6:""
1 parent ac2a01c commit a8e2ec1

File tree

15 files changed

+1297
-8
lines changed

15 files changed

+1297
-8
lines changed

assets/css/extended/custom.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* 尝试调整 Mermaid 图表整体的字体大小 */
2+
.mermaid svg {
3+
font-size: 16px; /* 调整为您希望的默认字体大小 */
4+
}
5+
6+
/* 如果上面的不够精确,可以更具体地针对节点内的文本 */
7+
.mermaid .label text, /* 流程图等标签 */
8+
.mermaid .actor, /* 序列图角色 */
9+
.mermaid .messageText, /* 序列图消息文本 */
10+
.mermaid .noteText, /* 注释文本 */
11+
.mermaid g.node text, /* 通用节点文本 */
12+
.mermaid .loopText text /* 循环块中的文本 */
13+
{
14+
font-size: 16px !important; /* 调整为您希望的字体大小,!important 可能需要用来覆盖默认样式 */
15+
}
16+
17+
/* 针对您图中特定类型的节点文本,可以进一步细化 */
18+
.mermaid .flowchart-label text, /* 流程图节点内的文本 */
19+
.mermaid .state-text text /* 状态图节点内的文本 */
20+
{
21+
font-size: 16px !important; /* 调整为您希望的字体大小 */
22+
}

public/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<meta name="description" content="">
1111
<meta name="author" content="">
1212
<link rel="canonical" href="http://localhost:1313/my-blog/404.html">
13-
<link crossorigin="anonymous" href="/my-blog/assets/css/stylesheet.f49d66caae9ea0fd43f21f29e71a8d3e284517ed770f2aa86fa012953ad3c9ef.css" integrity="sha256-9J1myq6eoP1D8h8p5xqNPihFF&#43;13Dyqob6ASlTrTye8=" rel="preload stylesheet" as="style">
13+
<link crossorigin="anonymous" href="/my-blog/assets/css/stylesheet.ce220725cb6f0bf77830c47ba31ebba6383d507f2fc2e29f6f156a6b9210628a.css" integrity="sha256-ziIHJctvC/d4MMR7ox67pjg9UH8vwuKfbxVqa5IQYoo=" rel="preload stylesheet" as="style">
1414
<link rel="icon" href="http://localhost:1313/my-blog/favicon.ico">
1515
<link rel="icon" type="image/png" sizes="16x16" href="http://localhost:1313/my-blog/favicon-16x16.png">
1616
<link rel="icon" type="image/png" sizes="32x32" href="http://localhost:1313/my-blog/favicon-32x32.png">

public/assets/css/stylesheet.ce220725cb6f0bf77830c47ba31ebba6383d507f2fc2e29f6f156a6b9210628a.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<meta name="description" content="">
1212
<meta name="author" content="">
1313
<link rel="canonical" href="http://localhost:1313/my-blog/">
14-
<link crossorigin="anonymous" href="/my-blog/assets/css/stylesheet.f49d66caae9ea0fd43f21f29e71a8d3e284517ed770f2aa86fa012953ad3c9ef.css" integrity="sha256-9J1myq6eoP1D8h8p5xqNPihFF&#43;13Dyqob6ASlTrTye8=" rel="preload stylesheet" as="style">
14+
<link crossorigin="anonymous" href="/my-blog/assets/css/stylesheet.ce220725cb6f0bf77830c47ba31ebba6383d507f2fc2e29f6f156a6b9210628a.css" integrity="sha256-ziIHJctvC/d4MMR7ox67pjg9UH8vwuKfbxVqa5IQYoo=" rel="preload stylesheet" as="style">
1515
<link rel="icon" href="http://localhost:1313/my-blog/favicon.ico">
1616
<link rel="icon" type="image/png" sizes="16x16" href="http://localhost:1313/my-blog/favicon-16x16.png">
1717
<link rel="icon" type="image/png" sizes="32x32" href="http://localhost:1313/my-blog/favicon-32x32.png">
@@ -106,6 +106,20 @@
106106
<main class="main">
107107

108108
<article class="first-entry">
109+
<header class="entry-header">
110+
<h2 class="entry-hint-parent">K8s源代码分析:Kubelet(1)-主循环
111+
</h2>
112+
</header>
113+
<div class="entry-content">
114+
<p>Kubelet 主工作流程源码深度剖析 Kubelet 是 Kubernetes 集群中每个节点上运行的核心组件,它负责管理 Pod 的生命周期、与容器运行时交互、上报节点和 Pod 状态等。本文将深入分析 Kubelet 的主工作流程,从启动函数 Run 开始,逐层解析其核心组件和循环机制。
115+
一、Kubelet 的启动入口:Kubelet.Run() 函数 graph TD subgraph Node[&#34;节点 (Node)&#34;] KubeletMain[&#34;Kubelet 主进程 (Kubelet.Run)&#34;] CRI[&#34;容器运行时 (CRI Interface)&#34;] CNI[&#34;网络插件 (CNI)&#34;] OS[&#34;操作系统 / cgroups&#34;] subgraph KubeletInternal[&#34;Kubelet 内部组件&#34;] PodManager[&#34;Pod 管理器&#34;] PLEG[&#34;PLEG (Pod Lifecycle Event Generator)&#34;] VolumeManager[&#34;卷管理器&#34;] StatusManager[&#34;状态管理器 (Pod &amp; Node)&#34;] PodWorkers[&#34;Pod Workers&#34;] APIServerClient[&#34;API Server 客户端&#34;] LogServer[&#34;日志服务&#34;] CloudSync[&#34;(可选) 云同步管理器&#34;] end KubeletMain --&gt; APIServerClient KubeletMain --- PodManager KubeletMain --- PLEG KubeletMain --- VolumeManager KubeletMain --- StatusManager KubeletMain --- PodWorkers KubeletMain --- LogServer KubeletMain --- CloudSync APIServerClient &lt;--&gt; ExternalAPIServer[&#34;Kubernetes API Server&#34;] PLEG &lt;--&gt; CRI PodWorkers &lt;--&gt; CRI PodWorkers &lt;--&gt; CNI PodWorkers &lt;--&gt; OS VolumeManager &lt;--&gt; OS end ExternalAPIServer -- 配置/指令 --&gt; KubeletMain KubeletMain -- 状态/事件 --&gt; ExternalAPIServer Kubelet.Run() 函数是整个 Kubelet 服务的起点,负责完成一系列初始化工作并启动各个后台服务和主工作循环。
116+
...</p>
117+
</div>
118+
<footer class="entry-footer"><span title='2025-05-06 11:22:12 +0800 CST'>May 6, 2025</span></footer>
119+
<a class="entry-link" aria-label="post link to K8s源代码分析:Kubelet(1)-主循环" href="http://localhost:1313/my-blog/posts/20250506/"></a>
120+
</article>
121+
122+
<article class="post-entry">
109123
<header class="entry-header">
110124
<h2 class="entry-hint-parent">Go并发编程实践:生产者-消费者模型的三种同步方案
111125
</h2>

public/index.xml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,55 @@
66
<description>Recent content on Yipeng M</description>
77
<generator>Hugo -- 0.146.7</generator>
88
<language>zh-cn</language>
9-
<lastBuildDate>Wed, 23 Apr 2025 11:22:12 +0800</lastBuildDate>
9+
<lastBuildDate>Tue, 06 May 2025 11:22:12 +0800</lastBuildDate>
1010
<atom:link href="http://localhost:1313/my-blog/index.xml" rel="self" type="application/rss+xml" />
11+
<item>
12+
<title>K8s源代码分析:Kubelet(1)-主循环</title>
13+
<link>http://localhost:1313/my-blog/posts/20250506/</link>
14+
<pubDate>Tue, 06 May 2025 11:22:12 +0800</pubDate>
15+
<guid>http://localhost:1313/my-blog/posts/20250506/</guid>
16+
<description>&lt;h2 id=&#34;kubelet-主工作流程源码深度剖析&#34;&gt;Kubelet 主工作流程源码深度剖析&lt;/h2&gt;
17+
&lt;p&gt;Kubelet 是 Kubernetes 集群中每个节点上运行的核心组件,它负责管理 Pod 的生命周期、与容器运行时交互、上报节点和 Pod 状态等。本文将深入分析 Kubelet 的主工作流程,从启动函数 &lt;code&gt;Run&lt;/code&gt; 开始,逐层解析其核心组件和循环机制。&lt;/p&gt;
18+
&lt;h3 id=&#34;一kubelet-的启动入口kubeletrun-函数&#34;&gt;一、Kubelet 的启动入口:&lt;code&gt;Kubelet.Run()&lt;/code&gt; 函数&lt;/h3&gt;
19+
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-mermaid&#34; data-lang=&#34;mermaid&#34;&gt;graph TD
20+
subgraph Node[&amp;#34;节点 (Node)&amp;#34;]
21+
KubeletMain[&amp;#34;Kubelet 主进程 (Kubelet.Run)&amp;#34;]
22+
CRI[&amp;#34;容器运行时 (CRI Interface)&amp;#34;]
23+
CNI[&amp;#34;网络插件 (CNI)&amp;#34;]
24+
OS[&amp;#34;操作系统 / cgroups&amp;#34;]
25+
26+
subgraph KubeletInternal[&amp;#34;Kubelet 内部组件&amp;#34;]
27+
PodManager[&amp;#34;Pod 管理器&amp;#34;]
28+
PLEG[&amp;#34;PLEG (Pod Lifecycle Event Generator)&amp;#34;]
29+
VolumeManager[&amp;#34;卷管理器&amp;#34;]
30+
StatusManager[&amp;#34;状态管理器 (Pod &amp;amp; Node)&amp;#34;]
31+
PodWorkers[&amp;#34;Pod Workers&amp;#34;]
32+
APIServerClient[&amp;#34;API Server 客户端&amp;#34;]
33+
LogServer[&amp;#34;日志服务&amp;#34;]
34+
CloudSync[&amp;#34;(可选) 云同步管理器&amp;#34;]
35+
end
36+
37+
KubeletMain --&amp;gt; APIServerClient
38+
KubeletMain --- PodManager
39+
KubeletMain --- PLEG
40+
KubeletMain --- VolumeManager
41+
KubeletMain --- StatusManager
42+
KubeletMain --- PodWorkers
43+
KubeletMain --- LogServer
44+
KubeletMain --- CloudSync
45+
46+
APIServerClient &amp;lt;--&amp;gt; ExternalAPIServer[&amp;#34;Kubernetes API Server&amp;#34;]
47+
PLEG &amp;lt;--&amp;gt; CRI
48+
PodWorkers &amp;lt;--&amp;gt; CRI
49+
PodWorkers &amp;lt;--&amp;gt; CNI
50+
PodWorkers &amp;lt;--&amp;gt; OS
51+
VolumeManager &amp;lt;--&amp;gt; OS
52+
end
53+
54+
ExternalAPIServer -- 配置/指令 --&amp;gt; KubeletMain
55+
KubeletMain -- 状态/事件 --&amp;gt; ExternalAPIServer
56+
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;Kubelet.Run()&lt;/code&gt; 函数是整个 Kubelet 服务的起点,负责完成一系列初始化工作并启动各个后台服务和主工作循环。&lt;/p&gt;</description>
57+
</item>
1158
<item>
1259
<title>Go并发编程实践:生产者-消费者模型的三种同步方案</title>
1360
<link>http://localhost:1313/my-blog/posts/go%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B%E5%AE%9E%E8%B7%B5-%E4%B8%89%E7%A7%8D%E4%BC%98%E9%9B%85%E9%80%80%E5%87%BA/</link>
272 KB
Loading
330 KB
Loading
510 KB
Loading

0 commit comments

Comments
 (0)