Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.06 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.06 KB

GKE Workshop LAB-13

Scaling a deployment using HPA

Context License

Deployment

  1. Create namespace and deployments:
kubectl apply -f 00-namespace.yaml
kubectl apply -f 01-php-deployment.yaml
  1. Inspect the pods once they are running:
kubectl get pods -n doit-lab-13
kubectl describe pod --selector run=php-apache -n doit-lab-13
  1. Deploy the load generator:
kubectl apply -f 02-load-generator-pod.yaml
  1. Check/wait until CPU and memory metrics are coming in:
watch -n 1 'kubectl top pod -n doit-lab-13'
  1. Deploy the Horizontal Pod Autoscaler:
kubectl apply -f 03-php-hpa.yaml
  1. Check/wait for scaleup:
kubectl get pod -n doit-lab-13 -w

Application Clean-Up

kubectl delete ns doit-lab-13