Kubernetes capacity planning: How to rightsize the requests of your cluster
https://sysdig.com/blog/kubernetes-capacity-planning/
Kubernetes capacity planning is one of the main challenges that infrastructure engineers have to face, as understanding Kubernetes limits and requests is not an easy thing.
You might be reserving way more resources than you need to ensure your containers don’t run out of memory, or are CPU throttled. If you are in this situation, you’re going to be charged for those resources even if they aren’t being used, and it will also make deployments more difficult to schedule. That’s why Kubernetes capacity planning is always a balance between the stability and reliability of the cluster, and the correct use of the resources.
您可能会保留比所需更多的资源,以确保您的容器不会耗尽内存,或者 CPU 受到限制。如果您处于这种情况,即使这些资源没有被使用,您也会为这些资源付费,而且这也会使部署更难以安排。这就是为什么 Kubernetes 容量规划总是在集群的稳定性和可靠性以及资源的正确使用之间取得平衡。
In this article, you’ll learn how to identify unused resources and how to rightsize the capacity of your cluster.
Don’t be a greedy developer
There are situations where a container requests more resources than it needs. If it’s just a container, it may not have a critical impact on the invoice from your cloud provider. But if this happens in all the containers, you’ll have several extra costs in your invoices in a large cluster.
Not to mention that if pods are too big, you may spend extra effort debugging scheduling issues. After all, it’s harder for Kubernetes to schedule bigger Pods following your priorities.
更不用说如果 pod 太大,您可能会花费额外的精力来调试调度问题。毕竟,Kubernetes 很难按照您的优先级安排更大的 Pod。
Two open-source tools will help you with Kubernetes capacity planning:
- kube-state-metrics: An add-on agent to generate and expose cluster-level metrics.
- CAdvisor: A resource usage analyzer for containers.
With these tools running in your cluster, you’ll be able to avoid resource underuse and rightsize the requests for your cluster.
通过在集群中运行这些工具,您将能够避免资源未充分利用并调整集群请求的大小。
相关文章
- 记录一次在生成数据库服务器上出现The timeout period elapsed prior to completion of the operation or the server is not responding.和Exception has been thrown by the target of an invocation的解决办法
- [systemd]How To Use Systemctl to Manage Systemd Services and Units
- SpringCloud 应用在 Kubernetes 上的最佳实践 — 高可用(熔断)
- 从零开始入门 K8s | Kubernetes API 编程范式
- 阿里云和微软共同开源的 OAM 对 Kubernetes 开发人员意味着什么?
- Kubernetes 健康检查之 Readiness 就绪检查
- Kubernetes 监控平面组件 scheduler controller-manager proxy kubelet etcd
- Relabeling Prometheus kubernetes_sd_configs 服务发现生成的元标签条目解析
- 【云原生 | Kubernetes 系列】使用PVC存储构建Zookeeper集群搭建
- AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.
- 在Kubernetes上运行SAP UI5应用(下): 一个例子体会Kubernetes内容器的高可用性和弹性伸缩
- 成功解决To fix this you could try to: 1. loosen the range of package versions you‘ve specified
- 成功解决MSB8020 The build tools for v141 (Platform Toolset = ‘v141‘) cannot be found. To build using the
- 【K3s】第25篇 解决The connection to the server localhost:8080 was refused
- 【云原生之kubernetes实战】kubernetes集群的HPA弹性伸缩
- 【云原生之kubernetes实战】使用docker作为运行时部署Kubernetes集群
- Kubernetes集群Pod控制器之Job控制器(二十六)
- kubernetes 坑人的错误!!!Unable to connect to the server: x509: certificate signed by unknown authority
- macOS The bottle needs the Xcode CLT to be installed
- Error:The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location:
- Kubernetes web界面kubernetes-dashboard安装【h】
- Kubernetes基本概念与组件
- Kubernetes 深入理解kubernetes(一)
- Kubernetes 将应用迁移至kubernetes
- Kubernetes 调度 Pod 亲和调度
- How to rightsize the Kubernetes resource limits
- Kubernetes基础_01_从云原生到kubernetes
- Kubernetes部署_使用kubernetes部署Mysql主从结构(Kubernetes工作实践类)