trident icon indicating copy to clipboard operation
trident copied to clipboard

save logs after controller restart

Open Rafmoshe2500 opened this issue 2 years ago • 2 comments

Hi, every time the controller is restart all the logs are deleted. And when we have an issue in our environments sometimes the controller is restart and we can not eead previoes logs.

How can we modify the writing logs path of trident-main logs.

Thanks.

Rafmoshe2500 avatar Mar 05 '24 12:03 Rafmoshe2500

You should be able to get previous logs by using the "--previous" parameter of kubectl, e.g.

kubectl logs deployment.apps/trident-controller -c trident-main -n trident --previous

For further analysis, long-term storage etc. of container logs you'd typically deploy a collector of your choice (such as fluentd, fluent bit, Vector, logstash,...) to collect logs and forward it to whatever solution you prefer. Trident would be just like any other container on your cluster in that regard.

wonderland avatar Mar 06 '24 15:03 wonderland

Thanks for answer. But because the controller is restart, The container is terminated and all the logs are deleted.

Rafmoshe2500 avatar Mar 06 '24 16:03 Rafmoshe2500