13.k8s 配额限制
2020-04-21 本文已影响0人
_zt_d58b
1.修改kubectl文件,配置默认配额
2.修改namespace,默认配额
apiVersion: v1
kind: ResourceQuota
metadata:
name: viomi-infra-quota
namespace: yunmi-infra
spec:
hard:
pods: 120
count/deployments.apps: 86
count/jobs.batch: 0
count/cronjobs.batch: 0
limits.memory: 350Gi
#目前使用43900Mi,预留60000-43900Mi
requests.memory: 150000Mi
services: 70
services.loadbalancers: 0
---
apiVersion: v1
kind: LimitRange
metadata:
name: yunmi-infra-limit-range
namespace: yunmi-infra
spec:
limits:
- max:
cpu: 10000m
memory: 4000Mi
min:
cpu: 100m
memory: 100Mi
default:
cpu: 4000m
memory: 4000Mi
defaultRequest:
cpu: 300m
memory: 256Mi
type: Container