You can write to stdout and see the logs of the crashed container with
kubectl logs (or kubectl logs --previous or something like that was the
flag called).

Usually writing to stdout is a good practice:-)

On Monday, August 20, 2018, Ashish r <ashish.re...@gmail.com> wrote:

> Hello all,
>
> I have implemented a 3 Master kubernetes cluster that works perfectly
> fine. I have been deploying some apps to test out the network. Assume I
> have deployed an application app1. There is only 1 replica of this pod on
> one of the kubernetes worker nodes. I am also writing the logs of the app
> to a file on the container . If for some reason, the container dies (the
> application service running inside the container died) the kubernetes
> master will bring up another pod/container. But I would like to view the
> logs of the container that has died so as to understand the root cause of
> the issue.
>
> I have give through this documentation but it only mentions about saving
> the log file on the container.
> https://kubernetes.io/docs/concepts/cluster-administration/logging/
> But I would atleast like to store it on my worker node or the master so
> that I do not loose the logs.
>
> I am looking for better ways of doing this. Any suggestion is highly
> appreciated and please let me know if I need to provide any additional
> information. Thanks in advance.
>
>
> Cheers,
> Ashish
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to