为其定义了HPA的kubernetes集群是否需要PDB? [英] Is PDB required for a kubernetes cluster for which HPA is defined?

查看:79
本文介绍了为其定义了HPA的kubernetes集群是否需要PDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Kubernetes集群.通过策略,我确保所有服务都定义了请求",限制"和"HPA",以便可以顺利进行自动缩放.我还定义了ResourceQuota.在这种情况下,是否也需要定义PDB?请告知.

I have a Kubernetes cluster. Through policies, I have made sure that all the services have Requests, Limits and HPA defined so that I can have smooth autoscaling. I have also defined ResourceQuota. In such a scenario, is there a need to define PDB as well? Please advise.

推荐答案

肯定地,PDB是为了补充您的副本集,以确保节点操作不会因为从同一时间运行所有必需的实例而被删除,从而不会降低您的服务水平.时间.它是一种资源,可以根据正在运行的副本的数量来进行查找,并利用pod标签选择器(与service相同)来识别您的PDB应该在哪个pod上查看

Definitely, PDBs are meant to complement your replica set to ensure that node operation won’t bring down your services by removing all the required instances from running at the same time. It is a resource that looms at the number of running replicas and leverages the pod label selector (same as the service ) to identify which pod your PDBs should be look at

在节点操作期间,执行挂载逐出时,漏极将停止并等待所有PDB得到遵守.如果驱逐将导致PDB无效的豆荚,将等到条件成立为止.

During a node operation, the drain will halt and wait that all PDBs are respected when performing pod eviction. Pods that if evicted would cause a PDB to be invalid would wait till the condition would be valid.

您需要注意的是具有正确的定义.具有单个副本的部署的PDB最有可能导致节点操作永远不会成功.

What you need to be careful is to have the right definition. A PDB for a deployment with a single replica will most likely cause the node operation to never succeed.

有关更多详细信息,请参阅本文

For more details, have a look at this articles

https://blog.gruntwork.io/避免在您的Kubernetes集群中使用PodDisruptionbudgets-ef6a4baa5085

有关资源清单的完整详细信息

And For full details on what the resource manifest is

https://kubernetes.io/docs/tasks/run-application/configure-pdb/

这篇关于为其定义了HPA的kubernetes集群是否需要PDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆