我运行名为“ helloworld”的Istio示例,然后获得该服务的HPA。当我创建一个高负载时,kubernetes会自动创建一个新的pod,但是10个小时后副本仍在9个上。
NAME TARGETS MINPODS MAXPODS REPLICAS AGE
helloworld-v2 2%/50% 1 10 9 17h
如何告诉kubernetes自动删除某些副本?
kubectl描述HPA
Name: helloworld-v2
Namespace: default
Labels: <none>
Annotations: <none>
CreationTimestamp: Wed, 14 Nov 2018 16:24:26 +0000
Reference: Deployment/helloworld-v2
Metrics: ( current / target )
resource cpu on pods (as a percentage of request): 3% (3m) / 50%
Min replicas: 1
Max replicas: 10
Deployment pods: 9 current / 9 desired
Conditions:
Type Status Reason Message
---- ------ ------ -------
AbleToScale True ReadyForNewScale recommended size matches current size
ScalingActive True ValidMetricFound the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)
ScalingLimited False DesiredWithinRange the desired count is within the acceptable range
Events: <none>
kubectl描述部署helloworld-v2
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
OldReplicaSets: helloworld-v2-6b6d5ddd54 (9/9 replicas created)
NewReplicaSet: <none>
Events: <none>
我没有发现任何错误。