Kubernetes CKA sample exam question 31 with answer

Question
Create a pod front-end-helper that write binaries downloaded successfully into a file front-end-helper.log.txt and then exits.
Check pod front-end-helper should be deleted automatically when the task is completed.

Answer
THe imperative command will be used:

kubectl run front-end-helper --image=busybox -it --rm --restart=Never -- /bin/sh -c 'echo binaries downloaded successfully' > front-end-helper-log.txt
Check the file:
cat front-end-helper-log.txt
kubectl get po
the pod is getting deleted after execution