Updated hpa config file to the latest API version.
Updated hpa config file to the latest API version.
This commit is contained in:
@@ -1,14 +1,13 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: autoscaling/v1
|
||||||
kind: HorizontalPodAutoscaler
|
kind: HorizontalPodAutoscaler
|
||||||
metadata:
|
metadata:
|
||||||
name: php-apache
|
name: php-apache
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
scaleRef:
|
scaleTargetRef:
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: php-apache
|
name: php-apache
|
||||||
subresource: scale
|
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
maxReplicas: 10
|
maxReplicas: 10
|
||||||
cpuUtilization:
|
targetCPUUtilizationPercentage: 50
|
||||||
targetPercentage: 50
|
|
||||||
|
|||||||
@@ -127,20 +127,19 @@ Here CPU utilization dropped to 0, and so HPA autoscaled the number of replicas
|
|||||||
Instead of using `kubectl autoscale` command we can use the [hpa-php-apache.yaml](/docs/user-guide/horizontal-pod-autoscaling/hpa-php-apache.yaml) file, which looks like this:
|
Instead of using `kubectl autoscale` command we can use the [hpa-php-apache.yaml](/docs/user-guide/horizontal-pod-autoscaling/hpa-php-apache.yaml) file, which looks like this:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: autoscaling/v1
|
||||||
kind: HorizontalPodAutoscaler
|
kind: HorizontalPodAutoscaler
|
||||||
metadata:
|
metadata:
|
||||||
name: php-apache
|
name: php-apache
|
||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
scaleRef:
|
scaleTargetRef:
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: php-apache
|
name: php-apache
|
||||||
subresource: scale
|
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
maxReplicas: 10
|
maxReplicas: 10
|
||||||
cpuUtilization:
|
targetCPUUtilizationPercentage: 50
|
||||||
targetPercentage: 50
|
|
||||||
```
|
```
|
||||||
|
|
||||||
We will create the autoscaler by executing the following command:
|
We will create the autoscaler by executing the following command:
|
||||||
|
|||||||
Reference in New Issue
Block a user