<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pod on Zayn's Blog</title><link>https://blog.treesir.pub/tags/pod/</link><description>Recent content in Pod on Zayn's Blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><managingEditor>yangzun@treesir.pub (Zayn)</managingEditor><webMaster>yangzun@treesir.pub (Zayn)</webMaster><copyright>2021-2026 Zayn</copyright><lastBuildDate>Thu, 08 Jul 2021 14:41:34 +0800</lastBuildDate><atom:link href="https://blog.treesir.pub/tags/pod/index.xml" rel="self" type="application/rss+xml"/><item><title>Kubernetes VPA 垂直 Pod 自动伸缩完整指南</title><link>https://blog.treesir.pub/posts/k8s-vpa/</link><pubDate>Thu, 08 Jul 2021 14:41:34 +0800</pubDate><author>yangzun@treesir.pub (Zayn)</author><guid>https://blog.treesir.pub/posts/k8s-vpa/</guid><description>&lt;h2 class="relative group">VPA 简介
&lt;div id="vpa-简介" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#vpa-%e7%ae%80%e4%bb%8b" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;h2 class="relative group">什么是 VPA？
&lt;div id="什么是-vpa" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e4%bb%80%e4%b9%88%e6%98%af-vpa" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>Vertical Pod Autoscaler（VPA，垂直 Pod 自动伸缩器）是 Kubernetes 的一个组件，它可以根据 Pod 的实际资源使用情况，自动调整 Pod 的 CPU 和内存请求值（requests）。&lt;/p></description></item><item><title>快速删除 Rancher 中失败的 Pod 资源</title><link>https://blog.treesir.pub/posts/quick-delete-rancher-failed-pod/</link><pubDate>Thu, 27 May 2021 08:59:56 +0800</pubDate><author>yangzun@treesir.pub (Zayn)</author><guid>https://blog.treesir.pub/posts/quick-delete-rancher-failed-pod/</guid><description>&lt;h2 class="relative group">问题描述
&lt;div id="问题描述" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e9%97%ae%e9%a2%98%e6%8f%8f%e8%bf%b0" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>在 Rancher 管理的 Kubernetes 集群中，有时会出现副本集中的 Pod 部署失败的情况。如下图所示，失败的 Pod 数量可能达到上千个，手动逐一删除非常耗时。&lt;/p>
&lt;p>
&lt;figure>
&lt;img class="my-0 rounded-md" loading="lazy" alt="image-20210527085545254" src="https://cdn.treesir.pub/img/image-20210527085545254.png">
&lt;/figure>
&lt;/p>
&lt;h2 class="relative group">解决方案
&lt;div id="解决方案" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;h2 class="relative group">批量删除失败的 Pod
&lt;div id="批量删除失败的-pod" class="anchor">&lt;/div>
&lt;span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
&lt;a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700 !no-underline" href="#%e6%89%b9%e9%87%8f%e5%88%a0%e9%99%a4%e5%a4%b1%e8%b4%a5%e7%9a%84-pod" aria-label="锚点">#&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>使用 kubectl 命令批量删除状态为 &lt;code>MatchNodeSelector&lt;/code> 的失败 Pod：&lt;/p></description></item></channel></rss>