<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Kubernetes - 标签 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/tags/kubernetes/</link><description>Kubernetes - 标签 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Fri, 09 May 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/tags/kubernetes/" rel="self" type="application/rss+xml"/><item><title>Kubernetes 优雅停止</title><link>https://rd163.visword.com/posts/k8s-termination-grace/</link><pubDate>Fri, 09 May 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-termination-grace/</guid><description>&lt;p>在 Kubernetes（K8s）中，Pod 的优雅终止是一个有序的过程，旨在确保 Pod 中运行的应用程序能够平滑关闭、释放资源，并尽可能减少因突然关闭带来的数据丢失和服务中断。&lt;/p></description></item><item><title>Kubernetes 渐进式发布</title><link>https://rd163.visword.com/posts/k8s-rollout/</link><pubDate>Wed, 23 Apr 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-rollout/</guid><description><![CDATA[<p>通常渐进式发布主要包括两类：蓝绿发布和金丝雀发布。本文对此做详细介绍，前置背景可参考:</p>
<ul>
<li><a href="https://www.hebye.com/docs/k8s-roll/k8s-roll-1dd4l55dga9d1" target="_blank" rel="noopener noreferrer">k8s 应用更新策略：灰度发布和蓝绿发布</a></li>
</ul>
<h2 id="常规方案" class="headerLink">
    <a href="#%e5%b8%b8%e8%a7%84%e6%96%b9%e6%a1%88" class="header-mark"></a>常规方案</h2><h3 id="蓝绿发布" class="headerLink">
    <a href="#%e8%93%9d%e7%bb%bf%e5%8f%91%e5%b8%83" class="header-mark"></a>蓝绿发布</h3><p>蓝绿部署中一共存在两套系统：一套是正在对外提供服务的系统，标记为「绿色」;另一套是准备发布的系统，标记为「蓝色」。两套系统都是功能完善、可独立运行的系统，只是版本和对外服务状态不同。</p>
<p>当需要用新版本替换线上旧版本时，会在现有系统之外部署一套使用新版本代码的全新系统。此时两套系统并存：继续对外提供服务的旧系统是绿色系统，新部署的系统是蓝色系统。切换时只需把流量入口指向蓝色系统即可完成发布;如需回退，再把流量切回绿色系统。</p>]]></description></item><item><title>k8s 暴露服务的方式</title><link>https://rd163.visword.com/posts/k8s-expose/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-expose/</guid><description><![CDATA[<h2 id="暴露-service-的三种方式" class="headerLink">
    <a href="#%e6%9a%b4%e9%9c%b2-service-%e7%9a%84%e4%b8%89%e7%a7%8d%e6%96%b9%e5%bc%8f" class="header-mark"></a>暴露 Service 的三种方式</h2><p>Kubernetes 中将 Service 暴露给集群外部访问，最常用的有三种类型：NodePort、LoadBalancer 和 Ingress。（ClusterIP 仅在集群内部可达，ExternalName 则通过 DNS CNAME 映射，二者不在本文讨论的对外暴露范围内。）</p>]]></description></item><item><title>K8s 本地安装</title><link>https://rd163.visword.com/posts/k8s-install-locally/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-install-locally/</guid><description>&lt;p>在学习和开发 Kubernetes(K8s)应用时，先在本地计算机上搭建一个集群用于验证，通常是最高效的方式。Kubernetes 官方文档专门将这类场景归为「学习环境（Learning Environment）」,与「生产环境（Production Environment）」相对。本文聚焦「安装」这一动作，给出四种主流本地安装方案的速查命令与关键点。&lt;/p></description></item><item><title>k8s 本地化安装部署</title><link>https://rd163.visword.com/posts/k8s-local-deploy/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-local-deploy/</guid><description>&lt;p>在学习和开发 Kubernetes(K8s)应用时,先在本地计算机上搭建一个集群用于测试和验证,是最高效的方式之一。官方文档将这些场景归为「学习环境(Learning Environment)」,与「生产环境(Production Environment)」相对。本文梳理四种主流的本地化部署工具,并对比其适用场景。&lt;/p></description></item><item><title>K8s 多集群</title><link>https://rd163.visword.com/posts/k8s-multi-cluster/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-multi-cluster/</guid><description><![CDATA[<h2 id="1-为什么需要-k8s-多集群" class="headerLink">
    <a href="#1-%e4%b8%ba%e4%bb%80%e4%b9%88%e9%9c%80%e8%a6%81-k8s-%e5%a4%9a%e9%9b%86%e7%be%a4" class="header-mark"></a>1. 为什么需要 K8s 多集群</h2><p>在讨论方案之前，先厘清概念。所谓 K8s 多集群（Multi-Cluster）,顾名思义就是多个 Kubernetes 集群协同工作。企业或组织可能根据自身需求，出于隔离性、可用性、合规性或使用成本等考虑，将应用运行在一个或多个集群中。在更成熟的形态下，应用实际运行的集群能够动态调度，不同集群间的应用也应支持相互访问。</p>]]></description></item><item><title>K8s 跨集群通信</title><link>https://rd163.visword.com/posts/k8s-pod-to-pod-different-clusters/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-pod-to-pod-different-clusters/</guid><description>&lt;p>跨集群 Pod 通信（Cross-Cluster Pod-to-Pod Communication）是多集群架构里最常被问到的问题之一。按底层网络是否互通，可以分两种情况讨论。&lt;/p></description></item><item><title>K8s 演示文稿及学习资源汇总</title><link>https://rd163.visword.com/posts/k8s-presentations/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-presentations/</guid><description>&lt;p>本文整理 Kubernetes(简称 K8s)学习路径上值得收藏的演示文稿、视频分享、官方文档与社区资源。内容面向不同阶段的学习者：从概念入门、网络模型深挖，到生产实践与认证考试，均可在此找到对应素材。文中链接以官方渠道与社区一手资料为主，尽量规避失效或转载失真的内容。&lt;/p></description></item><item><title>K8s 源码阅读</title><link>https://rd163.visword.com/posts/k8s-source-review/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-source-review/</guid><description><![CDATA[<h2 id="概述" class="headerLink">
    <a href="#%e6%a6%82%e8%bf%b0" class="header-mark"></a>概述</h2><p>Kubernetes 的主仓库 <a href="https://github.com/kubernetes/kubernetes" target="_blank" rel="noopener noreferrer"><code>kubernetes/kubernetes</code></a> 是一个以 Go 为主(占比约 97%)的庞大项目,截至本文写作时提交数已超过 14 万。直接从根目录切入很容易迷失方向,阅读源码前先理解它的整体结构、构建机制和典型调用链,可以显著降低入门成本。</p>]]></description></item><item><title>Kubernetes CRD 和 Operator</title><link>https://rd163.visword.com/posts/k8s-opeator/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/k8s-opeator/</guid><description>&lt;p>CRD 的全称是 CustomResourceDefinition，是 Kubernetes 为提高可扩展性、让开发者自定义资源（如 Deployment、StatefulSet 等）的一种方法。&lt;/p></description></item></channel></rss>