<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kubernetes on 我的博客</title><link>https://hugo.kkun.top/tags/kubernetes/</link><description>Recent content from 我的博客</description><generator>Hugo</generator><language>zh-cn</language><managingEditor>your@email.com (你的名字)</managingEditor><webMaster>your@email.com (你的名字)</webMaster><copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright><lastBuildDate>Tue, 24 Oct 2023 10:29:33 +0000</lastBuildDate><atom:link href="https://hugo.kkun.top/tags/kubernetes/index.xml" rel="self" type="application/rss+xml"/><item><title>K8s 持久化存储流程</title><link>https://hugo.kkun.top/post/k8s-%E6%8C%81%E4%B9%85%E5%8C%96%E5%AD%98%E5%82%A8%E6%B5%81%E7%A8%8B/</link><pubDate>Tue, 24 Oct 2023 10:29:33 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/k8s-%E6%8C%81%E4%B9%85%E5%8C%96%E5%AD%98%E5%82%A8%E6%B5%81%E7%A8%8B/</guid><description>
<![CDATA[<h1>K8s 持久化存储流程</h1><p>作者：你的名字（your@email.com）</p>
        
          <p>**导读：**众所周知，K8s 的持久化存储（Persistent Storage）保证了应用数据独立于应用生命周期而存在，但其内部实现却少有人提及。K8s 内部的存储流程到底是怎样的？PV、PVC、StorageClass、Kubelet、CSI 插件等之间的调用关系又如何，这些谜底将在本文中一一揭晓。</p>
        
        <hr><p>本文2023-10-24首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-10-24</p>]]></description><category>kubernetes</category></item><item><title>使用 OpenTelemetry Collector 收集 Kubernetes 日志数据</title><link>https://hugo.kkun.top/post/%E4%BD%BF%E7%94%A8-opentelemetry-collector-%E6%94%B6%E9%9B%86-kubernetes-%E6%97%A5%E5%BF%97%E6%95%B0%E6%8D%AE/</link><pubDate>Mon, 28 Aug 2023 10:52:55 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/%E4%BD%BF%E7%94%A8-opentelemetry-collector-%E6%94%B6%E9%9B%86-kubernetes-%E6%97%A5%E5%BF%97%E6%95%B0%E6%8D%AE/</guid><description>
<![CDATA[<h1>使用 OpenTelemetry Collector 收集 Kubernetes 日志数据</h1><p>作者：你的名字（your@email.com）</p>
        
          <p>前面我们介绍了如何<a href="https://blog.kkun.site/2023/08/28/%E4%BD%BF%E7%94%A8OpenTelemetry%20Collector%E9%87%87%E9%9B%86Kubernetes%E6%8C%87%E6%A0%87%E6%95%B0%E6%8D%AE/">通过 OpenTelemetry Collector 来收集 Kubernetes 集群的指标数据</a>，接下来我们再来了解下如何收集集群的日志记录数据。</p>
<p><img src="https://gh-proxy.com/https://raw.githubusercontent.com/Ghostpanter/tuchuang/main/img/202308280847173.jpeg" alt="图片"></p>
<h2 id="安装-loki">
<a class="header-anchor" href="#%e5%ae%89%e8%a3%85-loki"></a>
安装 Loki
</h2><p>首先我们需要部署 Loki 来收集日志数据，同样我们这里使用 Helm Chart 来快速部署，不过需要注意同样不需要部署任何日志采集器，因为我们将使用 OpenTelemetry Collector 来收集日志数据，然后再将其发送到 Loki 中。</p>
        
        <hr><p>本文2023-08-28首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-08-28</p>]]></description><category>kubernetes</category><category>OpenTelemetry Collector</category></item><item><title>使用 OpenTelemetry Collector 采集 Kubernetes 指标数据</title><link>https://hugo.kkun.top/post/%E4%BD%BF%E7%94%A8opentelemetry-collector%E9%87%87%E9%9B%86kubernetes%E6%8C%87%E6%A0%87%E6%95%B0%E6%8D%AE/</link><pubDate>Mon, 28 Aug 2023 09:52:55 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/%E4%BD%BF%E7%94%A8opentelemetry-collector%E9%87%87%E9%9B%86kubernetes%E6%8C%87%E6%A0%87%E6%95%B0%E6%8D%AE/</guid><description>
<![CDATA[<h1>使用 OpenTelemetry Collector 采集 Kubernetes 指标数据</h1><p>作者：你的名字（your@email.com）</p>
        
          <p><img src="https://gh-proxy.com/https://raw.githubusercontent.com/Ghostpanter/tuchuang/main/img/202308280933314.png" alt="图片"></p>
<p>Kubernetes 已成为一个被广泛采用的行业工具，对可观测性工具的需求也在不断增加。为此，OpenTelemetry 创建了许多不同的工具，来帮助 Kubernetes 用户观察他们的集群和服务。</p>
        
        <hr><p>本文2023-08-28首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-08-28</p>]]></description><category>kubernetes</category><category>OpenTelemetry Collector</category></item><item><title>使用helm安装NFS-Client Provisioner实现动态存储</title><link>https://hugo.kkun.top/post/%E4%BD%BF%E7%94%A8helm%E5%AE%89%E8%A3%85nfs-client-provisioner%E5%AE%9E%E7%8E%B0%E5%8A%A8%E6%80%81%E5%AD%98%E5%82%A8/</link><pubDate>Wed, 23 Aug 2023 14:22:51 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/%E4%BD%BF%E7%94%A8helm%E5%AE%89%E8%A3%85nfs-client-provisioner%E5%AE%9E%E7%8E%B0%E5%8A%A8%E6%80%81%E5%AD%98%E5%82%A8/</guid><description>
<![CDATA[<h1>使用helm安装NFS-Client Provisioner实现动态存储</h1><p>作者：你的名字（your@email.com）</p>
        
          <p>本文介绍使用helm安装NFS-Client Provisioner实现动态存储，主要包括使用helm安装NFS-Client Provisioner实现动态存储使用实例、应用技巧、基本知识点总结和需要注意事项，具有一定的参考价值，需要的朋友可以参考一下。</p>
        
        <hr><p>本文2023-08-23首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-08-23</p>]]></description><category>kubernetes</category><category>NFS</category></item><item><title>K8s Pod IP 分配机制</title><link>https://hugo.kkun.top/post/k8s-pod-ip-%E5%88%86%E9%85%8D%E6%9C%BA%E5%88%B6/</link><pubDate>Tue, 01 Aug 2023 17:03:33 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/k8s-pod-ip-%E5%88%86%E9%85%8D%E6%9C%BA%E5%88%B6/</guid><description>
<![CDATA[<h1>K8s Pod IP 分配机制</h1><p>作者：你的名字（your@email.com）</p>
        
          <h2 id="概述">
<a class="header-anchor" href="#%e6%a6%82%e8%bf%b0"></a>
概述
</h2><p>Pod 作为 K8s 中一等公民，其承载了最核心的 Container(s) 的运行。同时，Pod 也是 K8s 中资源调度的最小单位，因此熟悉其初始化过程（包括网络、存储、运行时等）将会使我们更加深入理解 K8s 的容器编排原理，以期更好的服务各类业务。</p>
        
        <hr><p>本文2023-08-01首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-08-01</p>]]></description><category>kubernetes</category></item><item><title>Kubernetes Pod 中容器的启动优先级</title><link>https://hugo.kkun.top/post/kubernetes-pod-%E4%B8%AD%E5%AE%B9%E5%99%A8%E7%9A%84%E5%90%AF%E5%8A%A8%E4%BC%98%E5%85%88%E7%BA%A7/</link><pubDate>Fri, 28 Jul 2023 17:54:33 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/kubernetes-pod-%E4%B8%AD%E5%AE%B9%E5%99%A8%E7%9A%84%E5%90%AF%E5%8A%A8%E4%BC%98%E5%85%88%E7%BA%A7/</guid><description>
<![CDATA[<h1>Kubernetes Pod 中容器的启动优先级</h1><p>作者：你的名字（your@email.com）</p>
        
          <p><img src="https://gh-proxy.com/https://raw.githubusercontent.com/Ghostpanter/tuchuang/main/img/202307281146482.png" alt="图片"></p>
<p>今天分享的主题是：怎么控制 <code>Kubernetes</code> 单个 <code>Pod</code> 中容器的启动顺序。</p>
<p>在前面讲容器设计模式时，我曾提到过 <code>Kubernetes Pod</code> 內有两种容器，分别是</p>
<ol>
<li><code>Init Container（初始化容器）</code>：在 <code>spec.initContainers</code> 结构体內</li>
<li><code>Application Container（应用容器）</code>：在 <code>spec.containers</code> 结构体內</li>
</ol>
<h2 id="init-container">
<a class="header-anchor" href="#init-container"></a>
<code>Init Container</code>
</h2><p><code>Init Container</code> 执行优先于 <code>Application Container</code>，且会按照顺序逐一执行，每个 <code>Init Container</code> 成功终止退出后，下一个 <code>Init Container</code> 才开始执行。</p>
        
        <hr><p>本文2023-07-28首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-07-28</p>]]></description><category>kubernetes</category></item><item><title>Kubernetes 1.27 原地调整 Pod 资源 (alpha)</title><link>https://hugo.kkun.top/post/kubernetes-1.27%E5%8E%9F%E5%9C%B0%E8%B0%83%E6%95%B4-pod-%E8%B5%84%E6%BA%90-alpha/</link><pubDate>Fri, 28 Jul 2023 17:40:33 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/kubernetes-1.27%E5%8E%9F%E5%9C%B0%E8%B0%83%E6%95%B4-pod-%E8%B5%84%E6%BA%90-alpha/</guid><description>
<![CDATA[<h1>Kubernetes 1.27 原地调整 Pod 资源 (alpha)</h1><p>作者：你的名字（your@email.com）</p>
        
          <p><img src="https://gh-proxy.com/https://raw.githubusercontent.com/Ghostpanter/tuchuang/main/img/202307201022602.png" alt="图片"></p>
<p>如果你部署的 Pod 设置了 CPU 或内存资源，你就可能已经注意到更改资源值会导致 Pod 重新启动。以前，这对于运行的负载来说是一个破坏性的操作。</p>
<p>在 Kubernetes v1.27 中，我们添加了一个新的 alpha 特性，允许用户调整分配给 Pod 的 CPU 和内存资源大小，而无需重新启动容器。首先，API 层面现在允许修改 Pod 容器中的 resources 字段下的 CPU 和 memory 资源。资源修改只需 patch 正在运行的 Pod 规约即可。</p>
        
        <hr><p>本文2023-07-28首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-07-28</p>]]></description><category>kubernetes</category></item><item><title>如何管理 Docker 容器和 Kubernetes Pod 的 DNS</title><link>https://hugo.kkun.top/post/%E5%A6%82%E4%BD%95%E7%AE%A1%E7%90%86docker%E5%AE%B9%E5%99%A8%E5%92%8Ckubernetes-pod%E7%9A%84dns/</link><pubDate>Fri, 28 Jul 2023 11:40:33 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/%E5%A6%82%E4%BD%95%E7%AE%A1%E7%90%86docker%E5%AE%B9%E5%99%A8%E5%92%8Ckubernetes-pod%E7%9A%84dns/</guid><description>
<![CDATA[<h1>如何管理 Docker 容器和 Kubernetes Pod 的 DNS</h1><p>作者：你的名字（your@email.com）</p>
        
          <h2 id="dns简介">
<a class="header-anchor" href="#dns%e7%ae%80%e4%bb%8b"></a>
DNS简介
</h2><p>DNS服务是域名系统的缩写， 英文全称：Domain Name System，将域名和IP地址相互映射。在容器环境中，DNS至关重要，例如在Kubernetes集群中，通常一组Pod由一个Service负载，但是Service的IP地址有可能需要变动，那么就可以让Pod通过域名的方式去访问Service，Pod无需理会IP地址的变化。</p>
        
        <hr><p>本文2023-07-28首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-07-28</p>]]></description><category>kubernetes</category></item><item><title>优化Kubernetes VPA的反应</title><link>https://hugo.kkun.top/post/%E4%BC%98%E5%8C%96kubernetes-vpa%E7%9A%84%E5%8F%8D%E5%BA%94/</link><pubDate>Fri, 28 Jul 2023 10:40:33 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/%E4%BC%98%E5%8C%96kubernetes-vpa%E7%9A%84%E5%8F%8D%E5%BA%94/</guid><description>
<![CDATA[<h1>优化Kubernetes VPA的反应</h1><p>作者：你的名字（your@email.com）</p>
        
          <p>这里是<a href="*https://www.miraxia.com/engineers-blog/optimizing-kubernetes-vertical-pod-autoscaler-responsiveness/*"><strong>日文版</strong></a>。</p>
<p>几周前，我在苦战优化<a href="*https://github.com/kubernetes/autoscaler/tree/vertical-pod-autoscaler-0.11.0/vertical-pod-autoscaler*"><strong>VPA</strong></a>（Vertical Pod Autoscaler）的性能。我们在公司计划做一个演示，应该有 5 到 10 分钟长，所以默认的 VPA 行为对我们来说太慢了。最终，不得不修改它的源代码，以便在几分钟内动态地改变 pod 的资源请求。</p>
        
        <hr><p>本文2023-07-28首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-07-28</p>]]></description><category>kubernetes</category></item><item><title>Pod 原地垂直伸缩 - 一个四年的KEP和两年的PR</title><link>https://hugo.kkun.top/post/pod-%E5%8E%9F%E5%9C%B0%E5%9E%82%E7%9B%B4%E4%BC%B8%E7%BC%A9/</link><pubDate>Fri, 28 Jul 2023 09:50:33 +0000</pubDate><author>your@email.com (你的名字)</author><guid>https://hugo.kkun.top/post/pod-%E5%8E%9F%E5%9C%B0%E5%9E%82%E7%9B%B4%E4%BC%B8%E7%BC%A9/</guid><description>
<![CDATA[<h1>Pod 原地垂直伸缩 - 一个四年的KEP和两年的PR</h1><p>作者：你的名字（your@email.com）</p>
        
          <p>该提案旨在允许 Pod 资源 requests 和 limits 的原地更新，而不需要重新启动 Pod 或其容器，该方案的核心思想是让 <code>PodSpec</code> 的 Resources 是可变的，表示所需的资源，此外 扩展 <code>PodStatus</code> 来反映分配给 Pod 的资源，并提供有关应用于 Pod 及其容器的实际资源信息。</p>
        
        <hr><p>本文2023-07-28首发于<a href='https://hugo.kkun.top/'>我的博客</a>，最后修改于2023-07-28</p>]]></description><category>kubernetes</category></item></channel></rss>