使Pod能够控制kubernetes中的另一个部署需要什么? [英] What is needed to enable a pod to control another deployment in kubernetes?

查看:84
本文介绍了使Pod能够控制kubernetes中的另一个部署需要什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试弄清各个部分,以及如何将它们组装在一起,以使Pod能够控制部署的各个方面,例如扩展.我以为我需要为此设置一个服务帐户,但找不到有关如何将它们链接在一起以及如何使吊舱使用该服务帐户的信息.我将用python编写此代码,这可能会增加使用服务帐户的复杂性

I'm trying to figure out the pieces and how to fit them together for having a pod be able to control aspects of a deployment, like scaling. I'm thinking I need to set up a service account for it, but I'm not finding the information on how to link it all together, and then how to get the pod to use the service account. I'll be writing this in python, which might add to the complexity of how to use the service account

推荐答案

尝试设置 Horizo​​ntal Pod Autoscaler基于观察到的CPU利用率(或借助自定义指标支持,基于某些其他应用程序提供的指标)自动缩放复制控制器,部署,副本集或状态集中的pod数量.水平Pod自动缩放不适用于无法缩放的对象,例如DaemonSets.

The Horizontal Pod Autoscaler automatically scales the number of pods in a replication controller, deployment, replica set or stateful set based on observed CPU utilization (or, with custom metrics support, on some other application-provided metrics). Horizontal Pod Autoscaling does not apply to objects that can’t be scaled, for example, DaemonSets.

Horizo​​ntal Pod Autoscaler被实现为Kubernetes API资源和控制器.该资源确定控制器的行为.控制器会定期调整复制控制器或部署中副本的数量,以使观察到的平均CPU利用率与用户指定的目标相匹配.

The Horizontal Pod Autoscaler is implemented as a Kubernetes API resource and a controller. The resource determines the behavior of the controller. The controller periodically adjusts the number of replicas in a replication controller or deployment to match the observed average CPU utilization to the target specified by user.

文档: hpa设置自动缩放.

这篇关于使Pod能够控制kubernetes中的另一个部署需要什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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