How to get logs of terminated jobs? · Issue #27768 · kubernetes/kubernetes
I've created a simple Job that echo a value when it exists.
However, I'm unable to get the logs of the pod/job after it has completed its processing.
$ kubectl get jobs
NAME DESIRED SUCCESSFUL AGE
sleeper 1 1 8m
$ kubectl get pods -a | grep sleeper
sleeper-psc5l 0/1 Completed 0 7m
$ kubectl logs sleeper
Error from server: pods "sleeper" not found
$ kubectl logs -p sleeper
Error from server: pods "sleeper" not found
How can I retrieve the job logs after its exit?
Read full article from How to get logs of terminated jobs? · Issue #27768 · kubernetes/kubernetes
No comments:
Post a Comment