NetApp / trident

Storage orchestrator for containers
Apache License 2.0
732 stars 218 forks source link

save logs after controller restart #889

Open Rafmoshe2500 opened 4 months ago

Rafmoshe2500 commented 4 months ago

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.

wonderland commented 4 months ago

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.

Rafmoshe2500 commented 4 months ago

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