이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다. Id: kubernetes-cpu-limits-not-set
Platform: Kubernetes
Severity: Low
Category: Resource Management
Learn More Description CPU limits should be set to ensure fair resource allocation and to prevent containers from consuming excessive CPU. Each container and initContainer should include a resources.limits.cpu value. This rule verifies that resources, resources.limits, and resources.limits.cpu are defined for each container.
Compliant Code Examples apiVersion : v1
kind : Pod
metadata :
name : frontend
spec :
containers :
- name : app
image : images.my-company.example/app:v4
resources :
limits :
cpu : "500m"
- name : log-aggregator
image : images.my-company.example/log-aggregator:v6
resources :
requests :
memory : "64Mi"
cpu : "250m"
limits :
memory : "128Mi"
cpu : "500m"
Non-Compliant Code Examples apiVersion : v1
kind : Pod
metadata :
name : frontend
spec :
containers :
- name : app
image : images.my-company.example/app:v4
resources :
limits :
memory : "64Mi"
- name : log-aggregator
image : images.my-company.example/log-aggregator:v6
resources :
requests :
memory : "64Mi"
cpu : "250m"
---
apiVersion : serving.knative.dev/v1
kind : Configuration
metadata :
name : dummy-config
namespace : knative-sequence
spec :
template :
spec :
containers :
- name : app
image : images.my-company.example/app:v4
resources :
limits :
memory : "64Mi"
- name : log-aggregator
image : images.my-company.example/log-aggregator:v6
resources :
requests :
memory : "64Mi"
cpu : "250m"