< Previous Challenge - Home - Next Challenge >
OpenShift allows users to scale the number of pods for each part of an application as needed. Looking at the deployment definition we have, we stated that we only want one pod to start with. Let’s try and change that!
In this challenge, we will be scaling up the number of pods that we have running in our applications. You will need to:
rating-api backend application to 4 podsrating-web frontend application to 2 podsTo complete this challenge successfully, you should be able to:
oc get pods or looking in the ARO Web ConsoleThis optional section should be done in the ARO Web Console.
In this part of the challenge you will need to:
rating-web frontend deployment
rating-web frontend deployment
When the resource limits are set and the HPA is added, let’s see autoscaling in action! To do that:
<rating-web-url> with your frontend application route using the command below:
rating-web deployment have more than 1 pod deployed
kubectl create deployment busybox --image=busybox --replicas=10 -- /bin/sh -c "while true; do wget -q -O- <rating-web-url>; done"
busybox deployment using the command: kubectl delete deployment busyboxNOTE: To autoscale future applications in the CLI and in your production environments make sure to include resource limits in your deployments. That way you won’t need to use the Web Console later on to autoscale or have to redeploy resources! Here are some learning resources to bookmark: