Files
robot-shop/K8s/autoscale.sh
Steve Waterworth 0a555bdab3 move script
2019-05-22 16:06:28 +01:00

15 lines
292 B
Bash
Executable File

#!/bin/sh
NS="robot-shop"
DEPLOYMENTS="cart catalogue dispatch payment ratings shipping user web"
for DEP in $DEPLOYMENTS
do
kubectl -n $NS autoscale deployment $DEP --max 2 --min 1 --cpu-percent 50
done
echo "Waiting 5 seconds for changes to apply..."
sleep 5
kubectl -n $NS get hpa