Kubernetes CKA sample exam question 117 with answer

Question
Set imperatively CPU and memory requests and limits for existing deployment pods with name nginx-prod.
Set requests for CPU and Memory as 100m and 256Mi respectively.
Set limits for CPU and Memory as 200m and 512Mi respectively.

Answer
Set command:

kubectl set resources deploy nginx-prod --limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi
Verify:
kubectl top po
kubectl describe po nginx-prod-68b8fb5bd7-q8sh