-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
573 lines (384 loc) · 49.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>Joohwan</title><meta name="author" content="Joohwan."><meta name="copyright" content="Joohwan."><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="该知道的都知道,不知道的慢慢了解">
<meta property="og:type" content="website">
<meta property="og:title" content="Joohwan">
<meta property="og:url" content="https://piwriw.github.io/index.html">
<meta property="og:site_name" content="Joohwan">
<meta property="og:description" content="该知道的都知道,不知道的慢慢了解">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://piwriw.github.io/img/avatar.jpg">
<meta property="article:author" content="Joohwan.">
<meta property="article:tag" content="Joohwan">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://piwriw.github.io/img/avatar.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://piwriw.github.io/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: {"path":"/search.xml","preload":false,"top_n_per_article":1,"unescape":false,"languages":{"hits_empty":"找不到您查询的内容:${query}","hits_stats":"共找到 ${hits} 篇文章"}},
translate: undefined,
noticeOutdate: {"limitDay":365,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":false,"highlightHeightLimit":false},
copy: {
success: '复制成功',
error: '复制错误',
noSupport: '浏览器不支持'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
dateSuffix: {
just: '刚刚',
min: '分钟前',
hour: '小时前',
day: '天前',
month: '个月前'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
source: {
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
}
},
isPhotoFigcaption: false,
islazyload: false,
isAnchor: false,
percent: {
toc: true,
rightside: false,
},
autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'Joohwan',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2025-01-09 00:31:42'
}</script><noscript><style type="text/css">
#nav {
opacity: 1
}
.justified-gallery img {
opacity: 1
}
#recent-posts time,
#post-meta time {
display: inline !important
}
</style></noscript><script>(win=>{
win.saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
if (ttl === 0) return
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = url => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
document.head.appendChild(script)
})
win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = url
if (id) link.id = id
link.onerror = reject
link.onload = link.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
link.onload = link.onreadystatechange = null
resolve()
}
document.head.appendChild(link)
})
win.activateDarkMode = function () {
document.documentElement.setAttribute('data-theme', 'dark')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
}
}
win.activateLightMode = function () {
document.documentElement.setAttribute('data-theme', 'light')
if (document.querySelector('meta[name="theme-color"]') !== null) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
}
}
const t = saveToLocal.get('theme')
if (t === 'dark') activateDarkMode()
else if (t === 'light') activateLightMode()
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><script src="/js/welcome.js"></script><script src="https://npm.elemecdn.com/[email protected]/dist/echarts.min.js"></script><meta name="generator" content="Hexo 6.3.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="/img/avatar.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">212</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">68</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">53</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/charts/"><i class="fa-fw fas fa-folder-open"></i><span> 文章统计</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于我</span></a></div><div class="menus_item"><a class="site-page" href="/wish/"><i class="fa-fw fas fa-tags"></i><span> 许愿墙</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/img/background.jpg')"><nav id="nav"><span id="blog-info"><a href="/" title="Joohwan"><span class="site-name">Joohwan</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/charts/"><i class="fa-fw fas fa-folder-open"></i><span> 文章统计</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于我</span></a></div><div class="menus_item"><a class="site-page" href="/wish/"><i class="fa-fw fas fa-tags"></i><span> 许愿墙</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">Joohwan</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/piwriw" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title="Email"><i class="fas fa-envelope-open-text"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2023/02/28/web/go/piwriw-blog/" title="piwriw_blog"><img class="post-bg" src="/img/go.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="piwriw_blog"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/28/web/go/piwriw-blog/" title="piwriw_blog">piwriw_blog</a><div class="article-meta-wrap"><span class="article-meta"><i class="fas fa-thumbtack sticky"></i><span class="sticky">置顶</span><span class="article-meta-separator">|</span></span><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-28T02:16:31.000Z" title="发表于 2023-02-28 10:16:31">2023-02-28</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/web/">web</a></span></div><div class="content">Piwriw Blog
基于Gin的个人博客系统
一个后端使用了Gin、数据库ORM使用Sqlx,前端使用了Vue2.X的个人博客系统
探索本项目的文档 »
本篇README.md面向开发者
目录
项目概述
页面演示
用户端
管理端
快速启动
文件目录说明
作者
鸣谢
项目概述Piwriw_blog是一个博客系统,前端基于Vue2构建了用户端和管理员系统,后端基于Gin和Sqlx构建。
页面演示用户端
首页
详情
管理端
文章编辑
文章列表
评论管理
分类列表
用户列表
个人设置
快速启动
克隆项目到本地git clone [email protected]:Piwriw/piwriw_blog.git
下载后端依赖(前提:你已经开启了go modules 并且设置了国内镜像代理)cd piwriw_blog go mod tidy
下载前端依赖
...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2025/01/08/cloud/braveheart/2024%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/" title="2024年终总结"><img class="post-bg" src="/img/braveheart.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="2024年终总结"></a></div><div class="recent-post-info"><a class="article-title" href="/2025/01/08/cloud/braveheart/2024%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/" title="2024年终总结">2024年终总结</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2025-01-08T15:38:55.000Z" title="发表于 2025-01-08 23:38:55">2025-01-08</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/braveheart/">braveheart</a></span></div><div class="content">2024年终总结那些我也许应该抵达的地方一月:与LeaderZhang相聚在绍兴,见到了书本上的鲁迅故居
五月:见过南京的各种故事
五月:抵达那个万象的重庆山城
五月:在武汉的东湖,骑行,期待下一次的重逢
六月:东莞HDC2024,与众星云集的相聚
七月:抵达广州,时隔许久相见18、19的师兄师姐
十月:与同学,自由行千岛湖
十一月:团建台州,点亮新图标
我🎓了
四年之期已经抵达终点站,毕业。
我带着我四年中做过有趣的项目,终于毕业了,虽然以1分之差,错过了优秀毕业论文,没能和LeaderZhang 双双拿下
因为这个项目,我也成功结缘于Cloud Native领域,在Java转向Go的迷茫中,寻找到了自己想追求的新方向K8s与容器化
这个项目也收到了老师资金资助正式发表到了省刊,虽然随着自己随着对领域的深入理解,感觉还是做的十分潦草,没什么特别的东西,但是也算是集齐了大学的一种神奇的体验
如何去写一篇论文
如何以第一作者发表期刊
如何绘制一个清晰的流程图
仰望星空也要脚踏实地在过去大半年的时间内,我很幸运的在我的第一志愿有一些了解的以及意向的云边部门实习了大 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2025/01/07/cloud/k8s/introduce/K8s%E4%B8%AD%E7%9A%84%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/" title="K8s中的垃圾回收"><img class="post-bg" src="/img/k8s-go.jpg" onerror="this.onerror=null;this.src='/img/404.png'" alt="K8s中的垃圾回收"></a></div><div class="recent-post-info"><a class="article-title" href="/2025/01/07/cloud/k8s/introduce/K8s%E4%B8%AD%E7%9A%84%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/" title="K8s中的垃圾回收">K8s中的垃圾回收</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2025-01-07T04:08:55.000Z" title="发表于 2025-01-07 12:08:55">2025-01-07</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/introduce/">introduce</a></span></div><div class="content">K8s中的垃圾回收
基于1.29
K8s的垃圾回收主要是以下的问题
结束的Pod对象
完结的Job对象
无主对象,这类的对象的Owner不存在
不再使用的容器和镜像
不再使用的动态创建的PV对象,对应的StorageClass声明了回收策略Delete
下列场景中被删除的Node
控制器的集群
Node Lease对象
Pod对象垃圾回收对于我阶段为Failed的Pod,对应的容器虽然已经停止,但是其资源对象依旧存在API Server,需要被Pod控制器或者运维人员手动删除
kube-controller-manager中有一个名为PodGC的组件专门负责自动清理“垃圾类”Pod
孤儿Pod,绑定的Node已经不存在
未调度就结束的Pod
终结中的Pod,这类Pod满足,它们被绑定到NotReady的Node,该Node有一个污点node.kubernetes.io/out-of-service,并且NodeOutOfServiceVolumeDetach特性门控开启
对于孤儿Pod,如果它们的阶段不少终结阶段,则PodGC会把它们设置为Failed,此时,如 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2025/01/06/cloud/k8s/kubelet/Kubelet%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="Kubelet运行机制解析"><img class="post-bg" src="/img/k8sLogo.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="Kubelet运行机制解析"></a></div><div class="recent-post-info"><a class="article-title" href="/2025/01/06/cloud/k8s/kubelet/Kubelet%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="Kubelet运行机制解析">Kubelet运行机制解析</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2025-01-06T13:22:55.000Z" title="发表于 2025-01-06 21:22:55">2025-01-06</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/kubelet/">kubelet</a></span></div><div class="content">Kubelet运行机制解析
基于1.29
在K8s集群中,在每个Node上都会启动一个kubelet进程,进程用于处理Master下发Node任务,管理Pod以及Pod中人容器。
每个kubelet进程都会在API Server注册Node信息,定期向Master汇报Node资源使用情况,并且通过cAdvisor监控容器和Node资源
自从K8s v1.28开始,kubelet通过--config-dir支持一个插件配置目录,在启动时,kubelet会合并以下几个部分的配置
命令行参数(优先级最低)
kubelet配置文件
排序的插件配置文件
在命令行中指定的特性门控–feature-gates(优先级最高)
Node通过kubelet启动参数--register-node决定是否向API Server注册自己,还可能有以下的参数
--api-servers:API Server的配置
--kubeconfig:kubeconfig文件,用于访问API Server的安全配置文件
资源管理深入理解节点可分配资源(Node Allocatable Resources) ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2025/01/05/cloud/k8s/kube-proxy/kube-proxy%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="kube-proxy运行机制解析"><img class="post-bg" src="/img/k8sLogo.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="kube-proxy运行机制解析"></a></div><div class="recent-post-info"><a class="article-title" href="/2025/01/05/cloud/k8s/kube-proxy/kube-proxy%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="kube-proxy运行机制解析">kube-proxy运行机制解析</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2025-01-05T14:31:55.000Z" title="发表于 2025-01-05 22:31:55">2025-01-05</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/kube-proxy/">kube-proxy</a></span></div><div class="content">kube-proxy运行机制解析
基于1.29
第一代Proxy一开始是一个真实的TCP/UDP代理,类似于HAProxy,负责转发从Service到Pod的访问流量,这被称为“userspace”模式
第二代Porxy从v1.2版本开始,K8s将iptables作为kube-proxy的默认模式,iptables模式组作为kube-proxy都默认模式
iptables模式,不再起到数据层面的Porxy作用,client向Service的请求流量通过iptables的NAT规则 直接发送到目标Pod,不再经过kube-proxy的转发,kube-proxy只承担控制层面的功能,即通过API Server的Watch接口实时跟踪Service与Endpoint的变更信息,并更新Node上相应的iptables规则
kube-proxy针对于Service和Pod创建一些主要的iptables规则如下:
KUBE-CLUSTER-IP:在masquerade-all=true或ClusterCIDR被指定的情况下对Service Cluster IP地址进行 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2025/01/05/cloud/k8s/kube-apiserver/Kube-ApiServer%E6%9E%B6%E6%9E%84%E8%A7%A3%E6%9E%90/" title="Kube-ApiServer架构解析"><img class="post-bg" src="/img/k8s-go.jpg" onerror="this.onerror=null;this.src='/img/404.png'" alt="Kube-ApiServer架构解析"></a></div><div class="recent-post-info"><a class="article-title" href="/2025/01/05/cloud/k8s/kube-apiserver/Kube-ApiServer%E6%9E%B6%E6%9E%84%E8%A7%A3%E6%9E%90/" title="Kube-ApiServer架构解析">Kube-ApiServer架构解析</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2025-01-05T09:08:55.000Z" title="发表于 2025-01-05 17:08:55">2025-01-05</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/apiserver/">apiserver</a></span></div><div class="content">Kube-ApiServer架构解析
基于1.29
API层:主要以REST方式提供各种API,除了K8s的CUED资源还有健康检查、日志等等
访问控制层:当有客户端访问API时,访问控制层负责对用户身份鉴权、校验
Registry:K8s把所有的资源对象都保存在注册表,针对不同的资源对象,都定义了资源对象的类型、如何创建资源对象,如何转换资源对象,以及如何资源编码为JSON或ProtoBuf格式进行存储
etcd:用于持久化存储K8s资源对象的KV数据库
K8s Proxy APIK8s Proxy API 的作用是代理REST请求,把API Server收到的REST请求转发到K8s进程的REST端口
该进程由kubelet负责响应
这里的信息,来自于Node,而不是ETCD所以可能存在偏差
K8s Porxy API路径如下:
# 列出指定Node的所有Pod/api/v1/nodes/{node}/proxy/pods # 列出指定Node都所有性能指标统计信息/api/v1/nodes/{node}/proxy/metric ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2025/01/01/cloud/k8s/kubeadm/K8s%E9%9B%86%E7%BE%A4%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0/" title="K8s集群版本更新"><img class="post-bg" src="/img/kubeadm.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="K8s集群版本更新"></a></div><div class="recent-post-info"><a class="article-title" href="/2025/01/01/cloud/k8s/kubeadm/K8s%E9%9B%86%E7%BE%A4%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0/" title="K8s集群版本更新">K8s集群版本更新</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2025-01-01T08:08:55.000Z" title="发表于 2025-01-01 16:08:55">2025-01-01</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/kubeadm/">kubeadm</a></span></div><div class="content">K8s集群版本更新在K8s集群更新,需要考虑不断运行的业务容器运行,通常流程,先更新Master上的K8s服务版本,在逐个更新Node的K8s服务版本
以二进制部署的K8s集群更新更新步骤一般如下:
获取官网的K8s二进制安装包
更新Master的kube-apiserver、kube-controller-manager、kube-scheduler
更新隔离Node,等待全部容器工作停止掉Pod,更新kubelet、kube-proxy 服务文件
恢复业务应用到流量到更新完成的Node上
以Kubeadm部署的K8s集群的版本更新可以通过kubeadm upgrade更新
更新kubeadm 本身
yum install -y kubeadm-1.21.0 --disableexcludes=kubernetes
查看kubeadm版本,kubeadm version
查看K8s更新的计划,内容,会检查系统的配置
kubeadm upgrade plan
执行升级
kubeadm upgrade apply
Node也进行升级
kubeadm upgrade node ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/12/31/cloud/k8s/install/K8s%E5%AE%89%E8%A3%85-%E5%9F%BA%E4%BA%8E%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6(%E9%AB%98%E5%8F%AF%E7%94%A8)/" title="K8s安装-基于二进制文件(高可用)"><img class="post-bg" src="/img/k8sLogo.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="K8s安装-基于二进制文件(高可用)"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/12/31/cloud/k8s/install/K8s%E5%AE%89%E8%A3%85-%E5%9F%BA%E4%BA%8E%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6(%E9%AB%98%E5%8F%AF%E7%94%A8)/" title="K8s安装-基于二进制文件(高可用)">K8s安装-基于二进制文件(高可用)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-12-31T14:08:55.000Z" title="发表于 2024-12-31 22:08:55">2024-12-31</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/install/">install</a></span></div><div class="content">K8s安装-基于二进制文件(高可用)
基于1.29
通过kubeadm可以快速搭建一个K8s集群,但是调整K8s集群参数,以及安全设置、高可用模式,就需要二进制安装
Master高可用部署架构Master高可用需要注意几个方面:
Master的kube-apiserver、kube-controller-manager和kube-schedule服务以多实例方式部署,至少有3个节点,节点需要为奇数,至少3个节点
Master启用基于CA认证的HTTPS安全机制
etcd至少有3个节点的集群部署模式
etcd集群启用了基于CA认证的HTTPS安全机制
Master启用了RBAC授权模式
创建CA根证书为了启用etcd和K8s服务基于CA认证的安全机制,首先需要配置CA证书
etcd和K8s制作CA证书的时候,都需要基于CA根证书
openssl genrsa -out ca.key 2048openssl req -x 509 -new -nodes -key ca.key -subj "/CN=192.168.18.3" -days 36500 -out ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2024/12/31/cloud/k8s/kubeadm/K8s%E5%AE%89%E8%A3%85-%E5%9F%BA%E4%BA%8Ekubeadm/" title="K8s安装-基于kubeadm"><img class="post-bg" src="/img/kubeadm.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="K8s安装-基于kubeadm"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/12/31/cloud/k8s/kubeadm/K8s%E5%AE%89%E8%A3%85-%E5%9F%BA%E4%BA%8Ekubeadm/" title="K8s安装-基于kubeadm">K8s安装-基于kubeadm</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-12-31T08:08:55.000Z" title="发表于 2024-12-31 16:08:55">2024-12-31</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/kubeadm/">kubeadm</a></span></div><div class="content">K8s安装-基于kubeadm
基于1.29
系统要求
软硬件
最低要求
推荐配置
主机资源
若集群中有1-5个Node:Master:2c+2GB;Node:1c
Master:4C和16GB;Node实际运行
Linux
Kernel内核在v3.10以上
CoreOS7.9
etcd
版本v3以上
etcdv3
容器运行时
各种cri
containerd v1.7
主要注意centos7默认开启防火墙,而K8s和各个Node有大量通信,推荐开启以下端口
组件
默认端口
API Server
6443
Controller Manager
10257
Scheduler
10259
Kubelet
10250;10255(只读端口)
etcd
2379(供客户端访问);2380(etcd集群节点之间访问)
集群的DNS服务
53(UDP);53(TCP)
对于其他组件,可能还需要开放其他端口,比如CNI Calico需要开放179端口
# 关闭防火墙systemctl disable firewalldsystemct ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/12/16/cloud/k8s/kubelet/K8s-kubelet(HTTP%E6%9C%8D%E5%8A%A1%E6%8E%A5%E5%8F%A3)/" title="K8s-kubelet(HTTP服务接口)"><img class="post-bg" src="/img/k8sLogo.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="K8s-kubelet(HTTP服务接口)"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/12/16/cloud/k8s/kubelet/K8s-kubelet(HTTP%E6%9C%8D%E5%8A%A1%E6%8E%A5%E5%8F%A3)/" title="K8s-kubelet(HTTP服务接口)">K8s-kubelet(HTTP服务接口)</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2024-12-16T13:22:55.000Z" title="发表于 2024-12-16 21:22:55">2024-12-16</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/cloud/">cloud</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/">k8s</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/categories/cloud/k8s/kubelet/">kubelet</a></span></div><div class="content">K8s-kubelet(HTTP服务接口)
基于1.25
kubelet通过HTTP Server对外暴露API,为了确保接口安全,kubelet按照安全等级从低到高顺序支持3种HTTP Server,分别是healthz server、readonly server和kubelet core server
一级类目
二级类目
Path路径
描述
Default Handlerers
healthz
/healthz
检查kubelet是否健康,重点检查syncLoop是否持续在规定时间内完成。检查syncLoop四因为其他组件故障会间接导致syncLoop不能执行成功
Default Handlerers
pods
/pods
读取当前节点运行的Pod列表(通过PodManager获取)
Default Handlerers
stats
/stats/summary
读取资源使用状态
Default Handlerers
metrics
/metrics
读取kubelet监控指标数据
Default H ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><span class="space">…</span><a class="page-number" href="/page/22/#content-inner">22</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-map"><div class="card-content"><div class="item-headline"><i class="fas fa-globe-asia" aria-hidden="true"></i><span>访客地图</span></div><script id="clstr_globe" type="text/javascript" defer="defer" src="//clustrmaps.com/globe.js?d=YyoMMHBiWFLjoLGTWWty-KlZJ1LcgGpGR22unnbKzaE"></script></div></div><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="/img/avatar.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Joohwan.</div><div class="author-info__description">该知道的都知道,不知道的慢慢了解</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">212</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">68</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">53</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/piwriw"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/piwriw" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:[email protected]" target="_blank" title="Email"><i class="fas fa-envelope-open-text"></i></a></div></div><div class="card-widget"><div class="item-headline"><i class="iconfont icat-visitor"></i><span>来访者</span></div><div class="item-content"><div id="welcome-info"></div></div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2025/01/08/cloud/braveheart/2024%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/" title="2024年终总结"><img src="/img/braveheart.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="2024年终总结"/></a><div class="content"><a class="title" href="/2025/01/08/cloud/braveheart/2024%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/" title="2024年终总结">2024年终总结</a><time datetime="2025-01-08T15:38:55.000Z" title="发表于 2025-01-08 23:38:55">2025-01-08</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2025/01/07/cloud/k8s/introduce/K8s%E4%B8%AD%E7%9A%84%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/" title="K8s中的垃圾回收"><img src="/img/k8s-go.jpg" onerror="this.onerror=null;this.src='/img/404.png'" alt="K8s中的垃圾回收"/></a><div class="content"><a class="title" href="/2025/01/07/cloud/k8s/introduce/K8s%E4%B8%AD%E7%9A%84%E5%9E%83%E5%9C%BE%E5%9B%9E%E6%94%B6/" title="K8s中的垃圾回收">K8s中的垃圾回收</a><time datetime="2025-01-07T04:08:55.000Z" title="发表于 2025-01-07 12:08:55">2025-01-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2025/01/06/cloud/k8s/kubelet/Kubelet%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="Kubelet运行机制解析"><img src="/img/k8sLogo.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="Kubelet运行机制解析"/></a><div class="content"><a class="title" href="/2025/01/06/cloud/k8s/kubelet/Kubelet%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="Kubelet运行机制解析">Kubelet运行机制解析</a><time datetime="2025-01-06T13:22:55.000Z" title="发表于 2025-01-06 21:22:55">2025-01-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2025/01/05/cloud/k8s/kube-proxy/kube-proxy%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="kube-proxy运行机制解析"><img src="/img/k8sLogo.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="kube-proxy运行机制解析"/></a><div class="content"><a class="title" href="/2025/01/05/cloud/k8s/kube-proxy/kube-proxy%E8%BF%90%E8%A1%8C%E6%9C%BA%E5%88%B6%E8%A7%A3%E6%9E%90/" title="kube-proxy运行机制解析">kube-proxy运行机制解析</a><time datetime="2025-01-05T14:31:55.000Z" title="发表于 2025-01-05 22:31:55">2025-01-05</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2025/01/05/cloud/k8s/kube-apiserver/Kube-ApiServer%E6%9E%B6%E6%9E%84%E8%A7%A3%E6%9E%90/" title="Kube-ApiServer架构解析"><img src="/img/k8s-go.jpg" onerror="this.onerror=null;this.src='/img/404.png'" alt="Kube-ApiServer架构解析"/></a><div class="content"><a class="title" href="/2025/01/05/cloud/k8s/kube-apiserver/Kube-ApiServer%E6%9E%B6%E6%9E%84%E8%A7%A3%E6%9E%90/" title="Kube-ApiServer架构解析">Kube-ApiServer架构解析</a><time datetime="2025-01-05T09:08:55.000Z" title="发表于 2025-01-05 17:08:55">2025-01-05</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
<i class="fas fa-folder-open"></i>
<span>分类</span>
<a class="card-more-btn" href="/categories/" title="查看更多">
<i class="fas fa-angle-right"></i></a>
</div>
<ul class="card-category-list" id="aside-cat-list">
<li class="card-category-list-item "><a class="card-category-list-link" href="/categories/basic/"><span class="card-category-list-name">basic</span><span class="card-category-list-count">33</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/basic/go/"><span class="card-category-list-name">go</span><span class="card-category-list-count">11</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/basic/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/"><span class="card-category-list-name">设计模式</span><span class="card-category-list-count">13</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/basic/%E9%9D%A2%E8%AF%95/"><span class="card-category-list-name">面试</span><span class="card-category-list-count">9</span></a></li></ul></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/braveheart/"><span class="card-category-list-name">braveheart</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/cloud/"><span class="card-category-list-name">cloud</span><span class="card-category-list-count">135</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/cloud/Harbor/"><span class="card-category-list-name">Harbor</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/cloud/Istio/"><span class="card-category-list-name">Istio</span><span class="card-category-list-count">1</span></a></li></ul></li>
</ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/keadm/" style="font-size: 1.1em; color: #999">keadm</a> <a href="/tags/Kube-controller-manager/" style="font-size: 1.43em; color: #99a6b8"> Kube-controller-manager</a> <a href="/tags/tools/" style="font-size: 1.32em; color: #99a2ae">tools</a> <a href="/tags/2024/" style="font-size: 1.1em; color: #999">2024</a> <a href="/tags/Linux%E9%83%A8%E7%BD%B2Go/" style="font-size: 1.1em; color: #999">Linux部署Go</a> <a href="/tags/job/" style="font-size: 1.14em; color: #999a9c">job</a> <a href="/tags/Istio/" style="font-size: 1.1em; color: #999">Istio</a> <a href="/tags/session/" style="font-size: 1.1em; color: #999">session</a> <a href="/tags/pod/" style="font-size: 1.35em; color: #99a3b1">pod</a> <a href="/tags/crio/" style="font-size: 1.1em; color: #999">crio</a> <a href="/tags/Harbor/" style="font-size: 1.1em; color: #999">Harbor</a> <a href="/tags/docker/" style="font-size: 1.17em; color: #999ca0">docker</a> <a href="/tags/iptables/" style="font-size: 1.1em; color: #999">iptables</a> <a href="/tags/K8s%E6%BA%90%E7%A0%81/" style="font-size: 1.5em; color: #99a9bf">K8s源码</a> <a href="/tags/validation/" style="font-size: 1.1em; color: #999">validation</a> <a href="/tags/hpa/" style="font-size: 1.1em; color: #999">hpa</a> <a href="/tags/cronjob/" style="font-size: 1.1em; color: #999">cronjob</a> <a href="/tags/%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%9A%E5%8A%A1%E7%8A%B6%E6%80%81%E7%A0%81/" style="font-size: 1.1em; color: #999">自定义业务状态码</a> <a href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" style="font-size: 1.28em; color: #99a0aa">计算机网络</a> <a href="/tags/kubeadm/" style="font-size: 1.17em; color: #999ca0">kubeadm</a> <a href="/tags/swagger/" style="font-size: 1.1em; color: #999">swagger</a> <a href="/tags/kubelet/" style="font-size: 1.1em; color: #999">kubelet'</a> <a href="/tags/poem/" style="font-size: 1.21em; color: #999da3">poem</a> <a href="/tags/crd/" style="font-size: 1.14em; color: #999a9c">crd</a> <a href="/tags/service/" style="font-size: 1.17em; color: #999ca0">service</a> <a href="/tags/deployment/" style="font-size: 1.1em; color: #999">deployment</a> <a href="/tags/web/" style="font-size: 1.46em; color: #99a8bc">web</a> <a href="/tags/%E5%88%86%E5%B8%83%E5%BC%8F/" style="font-size: 1.39em; color: #99a5b5">分布式</a> <a href="/tags/install/" style="font-size: 1.25em; color: #999fa7">install</a> <a href="/tags/etcd/" style="font-size: 1.1em; color: #999">etcd</a> <a href="/tags/sql/" style="font-size: 1.1em; color: #999">sql</a> <a href="/tags/storage/" style="font-size: 1.14em; color: #999a9c">storage</a> <a href="/tags/alertmanager/" style="font-size: 1.1em; color: #999">alertmanager</a> <a href="/tags/viper/" style="font-size: 1.1em; color: #999">viper</a> <a href="/tags/%E7%83%AD%E5%8A%A0%E8%BD%BD/" style="font-size: 1.1em; color: #999">热加载</a> <a href="/tags/grafana/" style="font-size: 1.14em; color: #999a9c">grafana</a> <a href="/tags/introduce/" style="font-size: 1.28em; color: #99a0aa">introduce</a> <a href="/tags/%E9%9D%A2%E8%AF%95/" style="font-size: 1.35em; color: #99a3b1">面试</a> <a href="/tags/prometheus/" style="font-size: 1.28em; color: #99a0aa">prometheus</a> <a href="/tags/sqlx/" style="font-size: 1.1em; color: #999">sqlx</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/archives/" title="查看更多">
<i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2025/01/"><span class="card-archive-list-date">一月 2025</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/12/"><span class="card-archive-list-date">十二月 2024</span><span class="card-archive-list-count">27</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/11/"><span class="card-archive-list-date">十一月 2024</span><span class="card-archive-list-count">26</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/10/"><span class="card-archive-list-date">十月 2024</span><span class="card-archive-list-count">18</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/09/"><span class="card-archive-list-date">九月 2024</span><span class="card-archive-list-count">10</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/08/"><span class="card-archive-list-date">八月 2024</span><span class="card-archive-list-count">8</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/07/"><span class="card-archive-list-date">七月 2024</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/05/"><span class="card-archive-list-date">五月 2024</span><span class="card-archive-list-count">3</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">212</div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">330.3k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2025-01-08T16:31:41.134Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">©2023 - 2025 By Joohwan.</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"><script>window.typedJSFn = {
init: (str) => {
window.typed = new Typed('#subtitle', Object.assign({
strings: str,
startDelay: 300,
typeSpeed: 150,
loop: true,
backSpeed: 50,
}, null))
},
run: (subtitleType) => {
if (true) {
if (typeof Typed === 'function') {
subtitleType()
} else {
getScript('https://cdn.jsdelivr.net/npm/typed.js/dist/typed.umd.min.js').then(subtitleType)
}
} else {
subtitleType()
}
}
}
</script><script>function subtitleType () {
if (true) {
typedJSFn.init(["我们登上并非我们所选择的舞台,演出并非我们所选择的剧本","该知道的都知道,不知道的慢慢了解","偶尔怀念一下就好了,脚下的路更重要"])
} else {
document.getElementById("subtitle").textContent = "我们登上并非我们所选择的舞台,演出并非我们所选择的剧本"
}
}
typedJSFn.run(subtitleType)</script></div><script id="click-show-text" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/click-show-text.min.js" data-mobile="false" data-text="Fighting,Joohwan,666" data-fontsize="15px" data-random="false" async="async"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span> 数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div class="no-result" id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div><!-- hexo injector body_end start -->
<script data-pjax src="undefined"></script>
<script data-pjax>
function GithubCalendarConfig(){
var git_githubapiurl ="undefined?piwriw";
var git_color =undefined;
var git_user ="piwriw";
var parent_div_git = document.getElementById('recent-posts');
var git_div_html = '<div class="recent-post-item" style="width:100%;height:auto;padding:10px; display: flex; align-items: center; justify-content: center;"> <img src="https://ghchart.rshah.org/piwriw" alt="piwriw" style="width: 100%; height: auto; max-width: 100%;"> </div> ';
if(parent_div_git && location.pathname =='/'){
console.log('已挂载github calendar')
// parent_div_git.innerHTML=git_div_html+parent_div_git.innerHTML // 无报错,但不影响使用(支持pjax跳转)
parent_div_git.insertAdjacentHTML("afterbegin",git_div_html) // 有报错,但不影响使用(支持pjax跳转)
};
GithubCalendar(git_githubapiurl,git_color,git_user)
}
if(document.getElementById('recent-posts')){
GithubCalendarConfig()
}
</script>
<style>#github_container{min-height:undefined}@media screen and (max-width:650px) {#github_container{background-image:;min-height:undefined}}</style>
<style>undefined</style><!-- hexo injector body_end end --></body></html>