0.
Default
Pod가 생성되면 컨테이너에 기본 CPU Request .5와 Memory 256Mi 가 할당된다.
Pod가 이러한 기본 값을 선택하려면 먼저 해당 Namespace에 LimitRange를 만들어 Request 및 Limit에 대한 기본값으로 설정해야 함.
apiVersion: v1
kind: LimitRange
metadata:
name: mem-limit-range
spec:
limits:
- default:
memory: 512Mi
defaultRequest:
memory: 256Mi
type: Container
https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/
apiVersion: v1
kind: LimitRange
metadata:
name: cpu-limit-range
spec:
limits:
- default:
cpu: 1
defaultRequest:
cpu: 0.5
type: Container
https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/
References:
https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource
'CKA &. CKAD > Scheduling' 카테고리의 다른 글
Practice Test - Resource Limits (0) | 2021.03.26 |
---|---|
PODs 와 Deployments를 편집하기위한 Quick note (0) | 2021.03.26 |
Practice Test - Node Selectors/Affinity (0) | 2021.03.26 |
Practice Test - Taints and Tolerations (0) | 2021.03.26 |
Practice Test - Labels and Selectors (0) | 2021.03.25 |