Free CKA Exam Braindumps (page: 16)

Page 16 of 31

Scale the deployment to 5 replicas

  1. Solution:

    kubectl scale deployment webapp ­replicas=5
    //Verify
    kubectl get deploy
    kubectl get po,rs

Answer(s): A



Scale down the deployment to 1 replica

  1. Solution:

    kubectl scale deployment webapp ­replicas=1
    //Verify
    kubectl get deploy
    kubectl get po,rs

Answer(s): A



Apply the autoscaling to this deployment with minimum 10 and maximum 20 replicas and target CPU of 85% and verify hpa is created and replicas are increased to 10 from 1

  1. Solution:

    kubectl autoscale deploy webapp --min=10 --max=20 --cpu percent=85
    kubectl get hpa

    kubectl get pod -l app=webapp

Answer(s): A



Clean the cluster by deleting deployment and hpa you just Created

  1. Solution:

    kubectl delete deploy webapp
    kubectl delete hpa webapp

Answer(s): A



Page 16 of 31



Post your Comments and Discuss Linux Foundation CKA exam with other Community members:

Atsushi commented on January 13, 2024
That's good!!
Anonymous
upvote