kubectl scale — scaling deployments.
1# Scaling2kubectl scale deployment myapp --replicas=53kubectl scale deployment myapp --replicas=3 -n production4kubectl scale deployment myapp --replicas=10 --current-replicas=356# Check7kubectl get deployment myapp8kubectl get rs # ReplicaSets9kubectl rollout status deployment/myapp1011# Auto-scaling (HPA)12kubectl get hpa13kubectl describe hpa myapp-hpa14kubectl autoscale deployment myapp --min=2 --max=10 --cpu-percent=701516# Vertical scaling (VPA)17kubectl get vpa18kubectl describe vpa myapp-vpa1920# Cluster Autoscaler21kubectl get nodes # New nodes appear automatically22kubectl get nodes --show-labels
Tips: