Class HorizontalPodAutoscalerSpec.Builder

    • Method Detail

      • maxReplicas

        public HorizontalPodAutoscalerSpec.Builder maxReplicas​(@NonNull
                                                               @NonNull java.lang.Number maxReplicas)
        upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.
        Returns:
        this.
      • minReplicas

        public HorizontalPodAutoscalerSpec.Builder minReplicas​(java.lang.Number minReplicas)
        minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.
        Returns:
        this.
      • targetCPUUtilizationPercentage

        public HorizontalPodAutoscalerSpec.Builder targetCPUUtilizationPercentage​(java.lang.Number targetCPUUtilizationPercentage)
        target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified the default autoscaling policy will be used.
        Returns:
        this.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object