we were able to deploy Cluster Autoscaler successfully.
The following steps will help test and validate the Cluster Autoscaler functionality in your cluster.
Deploy a sample application as a deployment. Scale deployment to 50. Scaling event monitoring.
Deploy sample application
kubectl get nodes
mkdir -p /home/ec2-user/environment
sudo vi /home/ec2-user/environment/nginx.yaml
Copy the following content into the nginx.yaml file:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-to-scaleout
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
service: nginx
app: nginx
spec:
containers:
- image: nginx
name: nginx-to-scaleout
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
memory: 512Mi
Finally, apply the nginx.yaml file:
kubectl apply -f ~/environment/nginx.yaml
kubectl get pod -l app=nginx
kubectl scale --replicas=10 deployment/nginx-to-scaleout
kubectl get pods -l app=nginx -o wide --watch
kubectl -n kube-system logs -f deployment/blueprints-addon-cluster-autoscaler-aws-cluster-autoscaler
kubectl get nodes
kubectl delete deploy nginx-to-scaleout
rm ~/environment/nginx.yaml