This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.2.5.3.2. 在创建 pod 时自动应用 VPA 建议
要仅在 pod 首次部署时使用 VPA 来应用推荐的资源,为特定的工作负载对象创建一个 VPA CR,将 updateMode
设置为 Initial
。
然后,手动删除与您要使用 VPA 建议的工作负载对象关联的 pod。在 Initial
模式中,VPA 不会删除 pod,也不会更新 pod,它会学习新的资源建议。
Initial
模式的 VPA CR 示例
注意
在 VPA 可以决定推荐的资源并对新 pod 应用推荐前,项目中必须已有已在运行的 pod。