An administrator needs to configure automatic scaling for a Google Kubernetes Engine (GKE) Deployment so that the number of Pod replicas increases or decreases based on CPU utilization. Which command should the administrator execute to achieve this?
- kubectl autoscale deployment web-app --min=2 --max=10 --cpu-percent=80Cevap
- Bgcloud container clusters update my-cluster --enable-autoscaling --min-nodes=2 --max-nodes=10
- Cgcloud container node-pools update my-pool --enable-autopilot --min-pods=2 --max-pods=10
- Dkubectl scale deployment web-app --replicas=10 --spot
Cevap
The correct command is `kubectl autoscale deployment web-app --min=2 --max=10 --cpu-percent=80`.
Executing `kubectl autoscale deployment` creates a Horizontal Pod Autoscaler (HPA) resource in GKE that automatically increases or decreases the number of Pod replicas in response to CPU utilization metrics.
Adım Adım Çözüm
Anahtar Kavram
Horizontal Pod Autoscaling (HPA) in Google Kubernetes Engine