kubectl scale deployment my-app --replica=3
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: php-apache
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
status:
observedGeneration: 1
lastScaleTime: <some-time>
currentReplicas: 1
desiredReplicas: 1
currentMetrics:
- type: Resource
resource:
name: cpu
current:
averageUtilization: 0
averageValue: 0
kubectl edit deployment my-app
updatePolicy
:
- Horizontal: adding more nodes to the cluster
- Vertical scaling: adding resources to the existing nodes in the cluster ## Scaling Workloads
- horiz: getting more pods
- vertical: adding resources to the existing pods 
FEATURE_GATES=InPlacePodVerticalScaling=true
```