Kubernetes CKA sample exam question 12 with answer

Question
A new application finance-audit-pod is deployed in finance namespace. There is something wrong with it. Identify and fix the issue.
Note: No configuration change allowed, you can only delete and recreate the pod (if required)

Answer
Get the status of the pod:

kubectl -n finance get po
As from output we can see the pod is in STATUS CrashLoopBackOff.
Try to get more details with describe:
kubectl -n finance describe po finance-audit-pod
From the event log we can see that the executable sheep is not found in $PATH.
Check the startup command and it is:
Command:
  sheep
  12000
Seems to be a typo of sleep command. Edit the pod and change the value:
kubectl -n finance edit po finance-audit-pod
Replace the current pod with saved manifest:
kubectl -n replace --force -f /tmp/kubectl-edit-123456.yaml
Verify the pod status, it should be running:
kubectl -n finance get po