Skip to content

Latest commit

 

History

History
86 lines (67 loc) · 2.87 KB

README.adoc

File metadata and controls

86 lines (67 loc) · 2.87 KB

Elastic Scale

Important
The instructions have not been written/finished, but you can already try out the resource files provided here. They might not fully work yet, but should be fixed soonish. The Instructions will be added soon, too.
Horizontal Pod Autoscaler
# Start Minikiube with 8GB of RAM
minikube start --memory 4096

# Enable metrics-server and heapster for measuring
minikube addons enable metrics-server
minikube addons enable heapster

# Create deployment for out random service
kubectl create -f deployment.yml

# For V1 HPA
kubectl autoscale deployment random-generator --min=1 --max=10 --cpu-percent=50

# Same for V2
kubectl create -f hpa.yml

# Put some load on the system
port=$(kubectl get svc random-generator -o jsonpath={.spec.ports[0].nodePort})
while true; do curl -s http://$(minikube ip):port?burn=10000 >/dev/null; done

# In other terminal:
watch kubectl get pods,deploy,hpa

# Delete HPA again
kubectl delete hpa random-generator
Vertical Pod Autoscaler
# Check that HPA is deleted

# Install VPA according to https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler
'''
git clone [email protected]:kubernetes/autoscaler.git
cd ./autoscaler/vertical-pod-autoscaler
./hack/vpa-up.sh
'''

# Deploy app if not already deployed
kubectl create -f deployment.yml

# Apply VPA resource
kubectl create -f vpa.yml

# Check VPA recommendations
kubectl describe vpa random-generator

More Information