In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Note: The following is only a fragment of resource restriction in yaml file, not a complete yaml file, just an essay of my own.
1. Resource limits for pods: [root@master limit]# vim cgroup-pod.yaml spec: containers: - name: xxx image: xxx ports: - protocol: TCP containerPort: 80 resources: limits: #Hard limits cpu: "4" memory: 2Gi requests: #Number of resources requested when running pod cpu: 260m memory: 260Mi2. Namespace-based resource limits (a namespace can be specified) 1) Calculate resource quotas [root@master limit]# vim compute-resource.yaml apiVersion: v1kind: ResourceQuotamedata: name: compute-resourcesspec: hard: pods: "20" #No more than 20 pods requests.cpu: "20" #Initial request CPU cannot exceed 20m requests.memory: 100Gi #Initial request memory cannot exceed 100 gigabytes limits.cpu: "40" #CPU Hard Limits limits.memory: 200Gi #Hard limit for memory 2) Quota limit for number of resource objects [root@master limit]# vim object-counts.yaml apiVersion: v1kind: ResourceQuotametwork: name: object-countsspec: hard: configmaps: "10" #You can create up to 10 configmaps persistentvolumeclaims: "4" You can create up to 4 PVCs replicationcontrollers: "20" #Up to 20 RC resource objects can be created secrets: "10" #You can create up to 10 secrets service.loadbalancers: "2" #Up to 2 svcs can be created 3) Configure CPU and memory limitRange[root@master limit]# vim limitRange.yaml apiVersion: v1kind: LimitRangemetatus: name: mem-limit-rangespec: limits: - default: memory: 50Gi #Hard limits cpu: 5 #Hard limits defaultRequest: #Initial Request memory: 1Gi cpu: 1 type: Container #Limit objects to containers
--------This article ends here, thanks for reading-------
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.