Use this command:
kubectl logs sample-pod
kubectl logs -f sample-pod
kubectl logs sample-pod -c nginx