Web application is experiencing high traffic
Your web application is experiencing high traffic. How would you scale the application in Kubernetes?
Edit the Deployment: Use kubectl scale to increase the number of replicas in your Deployment.
kubectl scale deployment my-webapp --replicas=5
kubectl scale deployment my-webapp --replicas=5
Verify Scaling: Ensure that the new pods are created and running
kubectl get pods -l app=web
Autoscaling (optional): Implement Horizontal Pod Autoscaler (HPA) to automatically scale based on CPU usage.
kubectl autoscale deployment my-webapp --cpu-percent=50 --min=3 --max=10
Thank you for reading.