0% found this document useful (0 votes)
3 views5 pages

Test 2

The document outlines a demonstration of auto-scaling in Kubernetes using an Apache web server. It includes steps to create deployments, configure Horizontal Pod Autoscaler (HPA), and manage HPA status and metrics. Additionally, it covers connecting to a web server and testing the service running on a pod.

Uploaded by

Muhammad Aamir
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Test 2

The document outlines a demonstration of auto-scaling in Kubernetes using an Apache web server. It includes steps to create deployments, configure Horizontal Pod Autoscaler (HPA), and manage HPA status and metrics. Additionally, it covers connecting to a web server and testing the service running on a pod.

Uploaded by

Muhammad Aamir
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Kubernetes: Demo Auto-Scaling

KUBERNETES : Advance of Kuebernetes

➤ Create Some Deployment/Replica-Set of some Service.


➤ Using Apache Web-Server.
➤ Generate YMLs and Execute them.
➤ Start HPA on Deployment.
kubectl autoscale deployment <deployment-name> --min=2 --max=5
—cpu-percent=80
➤ Get Status of HPA
kubectl get hpa
➤ Describe HPA Uses and Status.
kubectl describe hpa
➤ Get HPA YML for reference.
kubectl get <HPA Name> -o yaml > [Link]
KUBERNETES : Advance of Kuebernetes

➤ Add Metrics API Server on Kubernetes Cluster.


➤ Add WebHook for kubectl
➤ Restart the Cluster.
➤ Re-create the HPA
KUBERNETES : Advance of Kuebernetes

➤ Launch Shell and connect to WebServer.


kubectl run -i --tty service-test --image=busybox /bin/sh
➤ Connect with Service Running on Pod.
wget [Link]
➤ Run Above Command in Loop.
while true; do wget -q -O- [Link]
[Link]; done
Will see you in Next Lecture…

See you in next lecture …

You might also like