HPA targets invalid object 이 페이지는 아직 한국어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우
언제든지 연락주시기 바랍니다. Id: kubernetes-hpa-targets-invalid-object
Platform: Kubernetes
Severity: Low
Category: Availability
Learn More Description The HorizontalPodAutoscaler must target a valid object. This rule verifies each entry in spec.metrics with type: "Object" includes the required fields: object.metric, object.target, and object.describedObject with name, apiVersion, and kind. If any of these fields are missing, the metric is considered invalid.
Compliant Code Examples apiVersion : autoscaling/v2beta2
kind : HorizontalPodAutoscaler
metadata :
name : php-apache
spec :
scaleTargetRef :
apiVersion : apps/v1
kind : Deployment
name : php-apache
minReplicas : 1
maxReplicas : 10
metrics :
- type : Object
object :
metric :
name : requests-per-second
describedObject :
apiVersion : networking.k8s.io/v1beta1
kind : Ingress
name : main-route
target :
type : Value
value : 10k
apiVersion : autoscaling/v2beta2
kind : HorizontalPodAutoscaler
metadata :
name : matching-svc
namespace : default
spec :
metrics :
- resource :
name : cpu
target :
averageUtilization : 50
type : Utilization
type : Resource
minReplicas : 1
maxReplicas : 5
scaleTargetRef :
apiVersion : apps/v1
kind : Deployment
name : matching-svc
Non-Compliant Code Examples apiVersion : autoscaling/v2beta2
kind : HorizontalPodAutoscaler
metadata :
name : php-apache
spec :
scaleTargetRef :
apiVersion : apps/v1
kind : Deployment
name : php-apache
minReplicas : 1
maxReplicas : 10
metrics :
- type : Object
object :
metric :
name : requests-per-second
target :
type : Value
value : 10k
describedObject :
apiVersion : networking.k8s.io/v1beta1
kind : Ingress