当前位置:网站首页>Kubernetes ---- pod configuration resource quota
Kubernetes ---- pod configuration resource quota
2022-07-26 14:32:00 【51CTO】
One 、Pod Resource quotas
1.1 Introduction to resource quota configuration
The program in the container needs to run , It must take up some resources , such as CPU Memory and so on. , If you don't limit the resources of a container , Then it may eat a lot of resources , Cause the gas container to fail to operate , In this case ,kubernetes Provides access to memory and CPU A mechanism for allocating resources , This mechanism is mainly through resources Option class implementation , It has two sub options
- limits: Used to limit the maximum resources used by the runtime container , When the container takes up more than limits Will be terminated , And restart
- requests: Used to set the minimum resource required by the container , If environmental resources are not enough , The container cannot start
1.2 Resource quota configuration
as follows , edit pod_base.yaml file , Yes nginx The container sets the upper and lower resource limits
Use the following command to create pod
Use the following command to query pod, Find the quota configuration at this time , The environment meets the requirements ,pod It starts normally
Use the following command to delete the resource
1.3 Quota over allocation test
You can do an experiment here , take cpu Modify the lower limit to 10, The upper limit is changed to 20, Then try again , Because the core count of the virtual machine here is 4, Modify the lower limit to 10 The latter is obviously unable to meet the requirements
Then create it using the following command :
After re creation, you can see the prompt here through the following command cpu It's not enough
Use the following command to delete the resource
边栏推荐
- 基于用户画像的在线健康社区用户流失预测研究
- C语言贪吃蛇-链表和指针练习
- 『SignalR』.NET使用 SignalR 进行实时通信初体验
- UDP multithreaded online chat
- 关于存储芯片的入门基础知识
- Construction practice of pipeline engine of engineering efficiency ci/cd
- 如何评价测试质量?
- Would you please tell me if there is a way for Flink SQL not to output update_ before?
- One stop monitoring of the software and hardware infrastructure of the whole university, and Suzhou University replaces PostgreSQL with time series database
- mysql5.7通过文件zip方式安装-九五小庞
猜你喜欢
随机推荐
【愚公系列】2022年7月 Go教学课程 017-分支结构之IF
注解和反射
Use of URL download resources
如何做 APP 升级测试 ?
基于多特征的技术融合关系预测及其价值评估
android安全基础知识学习
Joint entity and event extraction model based on multi task deep learning
Plato Farm有望通过Elephant Swap,进一步向外拓展生态
Multi task text classification model based on tag embedded attention mechanism
OpenCV中图像算术操作与逻辑操作
保证接口数据安全的10种方案
MySQL-04 存储引擎和数据类型
图神经网络Core数据集介绍
[GYCTF2020]FlaskApp
uni-app从创建到运行到微信开发者工具
When AI encounters life and health, Huawei cloud builds three bridges for them
[untitled]
GDB common commands
MySQL-03 数据库操作
Seata deployment and microservice integration









