Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
When you may prefer to a create a Horizontal Pod Autoscaler (hpa
) in Kubernetes, then you may run the next:
If you have already got a deployment, then ignore this step, in any other case:
kubectl create deployment php-apache --image=us.gcr.io/k8s-artifacts-prod/hpa-example
kubectl set assets deploy php-apache --requests=cpu=200m
kubectl expose deploy php-apache --port 80
kubectl get pod -l app=php-apache
kubectl autoscale deployment php-apache `#The goal common CPU utilization`
--cpu-percent=50
--min=1 `#The decrease restrict for the variety of pods that may be set by the autoscaler`
--max=10 `#The higher restrict for the variety of pods that may be set by the autoscaler`
hpa
kubectl get hpa