Requests là lượng tài nguyên scheduler dùng để đặt Pod lên node. Limits là trần runtime container được phép dùng. CPU limit có thể gây throttling; memory vượt limit thường bị OOMKilled.
Ví dụ:
yaml
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: 1000m
memory: 512MiKhông đặt requests quá thấp để nhồi node nếu app latency-sensitive.
Cần đo thực tế bằng metrics rồi điều chỉnh.
Requests are the resources the scheduler uses to place a Pod on a node. Limits are the runtime ceiling a container is allowed to use. CPU limits can cause throttling; memory above the limit usually causes OOMKilled.
Example:
yaml
resources:
requests:
cpu: 250m
memory: 256Mi
limits:
cpu: 1000m
memory: 512MiDo not set requests too low just to pack nodes if the app is latency-sensitive.
Measure with real metrics and tune.