Kubernetes CKA sample exam question 86 with answer

Question
Scale up the application called web-app in dev namespace to 5 replicas. Make sure to record the change.

Answer
Method 1. Edit manifest, set spec.replicas to 5 and record the changes:

kubectl edit deployment web-app -n dev --record
Method 2. Set value imperatively and record the changes:
kubectl scale deployment web-app --replicas=5 -n dev --record
--record flag helps to see the details of the revision history. When you don't append --record - field CHANGE-CAUSE will be just <none> in:
kubectl rollout history