Skip to content

Commit 382491b

Browse files
Merge pull request #268950 from german1608/patch-1
Update tutorial-kubernetes-scale.md
2 parents 52fe7a2 + 9c0d373 commit 382491b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

articles/aks/tutorial-kubernetes-scale.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,24 @@ These resource requests and limits are defined for each container, as shown in t
103103
1. Create a manifest file to define the autoscaler behavior and resource limits, as shown in the following condensed example manifest file `aks-store-quickstart-hpa.yaml`:
104104

105105
```yaml
106-
apiVersion: autoscaling/v1
106+
apiVersion: autoscaling/v2
107107
kind: HorizontalPodAutoscaler
108108
metadata:
109109
name: store-front-hpa
110110
spec:
111111
maxReplicas: 10 # define max replica count
112112
minReplicas: 3 # define min replica count
113-
targetCPUUtilizationPercentage: 50 # target CPU utilization
114113
scaleTargetRef:
115114
apiVersion: apps/v1
116115
kind: Deployment
117116
name: store-front
117+
metrics:
118+
- type: Resource
119+
resource:
120+
name: cpu
121+
target:
122+
type: Utilization
123+
averageUtilization: 50
118124
```
119125
120126
2. Apply the autoscaler manifest file using the `kubectl apply` command.

0 commit comments

Comments
 (0)