apiVersion: v1
kind: LimitRange
metadata:
  name: example
spec:
  limits:
  - type: Pod # 指定整个POD的资源限制
    min:  # pod中所有容器的cpu和内存的请求量之和的最小值
      cpu: 50m
      memory: 5Mi
  - type: Container # 指定容器的资源限制
    defaultRequest:
      cpu: 100m
      memory: 10Mi
    default:
      cpu: 200m
      memory: 100Mi
    min:
      cpu: 50m
      memory: 5Mi
    max:  # pod中所有容器的cpu和内存的请求量之和的最大值
      cpu: 1
      memory: 1Gi
    maxLimitRequestRatio:
      cpu: 4
      memory: 10
  - type: PersistentVolumeClaim
    min:
      storage: 1Gi
    max:
      storage: 10Gi