Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GCP kubernetes HPA未按说明工作_Kubernetes_Google Cloud Platform_Google Kubernetes Engine_Gcp - Fatal编程技术网

GCP kubernetes HPA未按说明工作

GCP kubernetes HPA未按说明工作,kubernetes,google-cloud-platform,google-kubernetes-engine,gcp,Kubernetes,Google Cloud Platform,Google Kubernetes Engine,Gcp,我们已经在GCP上运行kubernetes上的工作负载大约一年了,然而,上周,我们的一个网站受到了网站所有者发起的促销活动的沉重打击,但我们没有对集群进行预分级 从那以后,我们一直在测试集群上对堆栈进行负载测试,我们遇到的问题是,使用Google节点时,HPA不会像文档中所写的那样进行扩展,而是始终进行扩展 2-->4-->8-->16-->32--64--128 不管CPU负载如何 例如,在我们的测试中,我们有251%/60%的cpu,运行8个POD。我的数学表明需要(251/60)*8=33

我们已经在GCP上运行kubernetes上的工作负载大约一年了,然而,上周,我们的一个网站受到了网站所有者发起的促销活动的沉重打击,但我们没有对集群进行预分级

从那以后,我们一直在测试集群上对堆栈进行负载测试,我们遇到的问题是,使用Google节点时,HPA不会像文档中所写的那样进行扩展,而是始终进行扩展

2-->4-->8-->16-->32--64--128

不管CPU负载如何

例如,在我们的测试中,我们有251%/60%的cpu,运行8个POD。我的数学表明需要(251/60)*8=33个豆荚,但是,下一个豆荚数将始终为16,然后等待3分钟再到32

测试运行所需的扩展约为64个吊舱,它在大约25分钟后到达,而不是8分钟,有没有办法让GCP版本更像手册一样运行

    apiVersion: autoscaling/v1
    kind: HorizontalPodAutoscaler
    metadata:
      annotations:
        autoscaling.alpha.kubernetes.io/conditions: '[{"type":"AbleToScale","status":"False","lastTransitionTime":"2017-11-        22T14:17:35Z","reason":"BackoffBoth","message":"the
          time since the previous scale is still within both the downscale and upscale
          forbidden windows"},{"type":"ScalingActive","status":"True","lastTransitionTime":"2017-11-21T19:09:34Z","reason":"ValidMetricFound","message":"the
          HPA was able to succesfully calculate a replica count from cpu resource utilization
          (percentage of request)"},{"type":"ScalingLimited","status":"False","lastTransitionTime":"2017-11-22T14:11:05Z","reason":"DesiredWithinRange","message":"the
          desired replica count is within the acceptible range"}]'
        autoscaling.alpha.kubernetes.io/current-metrics: '[{"type":"Resource","resource":{"name":"cpu","currentAverageUtilization":64,"currentAverageValue":"193m"}}]'
      creationTimestamp: 2017-11-20T15:44:48Z
      name: varnish-7
      namespace: default
      resourceVersion: "373498"
      selfLink: /apis/autoscaling/v1/namespaces/default/horizontalpodautoscalers/varnish-7
      uid: bd60211b-ce09-11e7-af0d-42010a8e0099
    spec:
      maxReplicas: 60
      minReplicas: 2
      scaleTargetRef:
        apiVersion: extensions/v1beta1
        kind: Deployment
        name: varnish-7
      targetCPUUtilizationPercentage: 50
    status:
      currentCPUUtilizationPercentage: 64
      currentReplicas: 8
      desiredReplicas: 8
      lastScaleTime: 2017-11-22T14:16:05Z

最好粘贴命令/YAML,该命令具有HPAEdited原件的规范,以添加hpa YAML。这一点目前没有受到严重影响。最好粘贴命令/YAML,该命令具有HPAEdited原件的规范,以添加hpa YAML。这一点目前没有受到严重打击。