How can we store the logs even if the pod is terminated #293
Replies: 4 comments
-
For log persistence, I recommend installing logs aggregation tool like Grafana Loki or ELK (Elasticsearch + Fluentbit + Kibana) . You get logs aggregated in a single database that can be effectively filtered and searched. |
Beta Was this translation helpful? Give feedback.
-
Sure, you can mount magento2-on-kubernetes/deploy/bases/app/magento-web.yaml Lines 200 to 203 in 3b43745 You can either use a different However, this project is set up in such a way, that all Magento logs are automatically included in container (Pod) logs. We're using a module for that: magento2-on-kubernetes/src/composer.json Line 24 in 3b43745 This is the recommended way of handling application logs: https://12factor.net/logs These logs are then collected, stored, and managed by a dedicated log aggregation system such as EFK stack, ELK stack, Loki, or a specific solution offered by your cloud provider. See https://www.cncf.io/blog/2023/07/03/kubernetes-logging-best-practices/ for a general overview of how log aggregation works in Kubernetes. |
Beta Was this translation helpful? Give feedback.
-
where will be php-fpm & php logs will be stored if we want view this |
Beta Was this translation helpful? Give feedback.
-
PHP, PHP-FPM, Nginx and Magento logs are all forwarded to container To view the logs run In order to store these logs, you'll need to have log aggregation set up as outlined in my previous comment. |
Beta Was this translation helpful? Give feedback.
-
can we use any PVC path for persistence of logs , including every log
Beta Was this translation helpful? Give feedback.
All reactions