- The official Kubernetes does not yet provide the functionality to copy files from stopped/completed Pods. Reference. However, you can obtain the log information from the previous Pod using the following command:
kubectl logs <podname> -n <namespace> --previous
- If by reviewing the logs you determine that the pod is unable to reach the Running state due to probe (container Probe) failure, you can disable the Pod's probes using the following command to allow the Pod to reach the Running state, then enter the Pod to view or copy files.
kubectl annotate pod {pod name} runmode=debug