Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access Logs of Pods in Kubernetes after its deletion

We have CentOS based infra for kubernetes and also using Openshift on top of tis. We have terminated a pod and now its not visible on master controller any more. However we are willing to analyze its logs.Can we still access its logs?How ?

like image 584
knowdotnet Avatar asked Sep 30 '18 18:09

knowdotnet


1 Answers

Containers together with its logs get deleted when you issue a kubectl delete pod <pod-name>. You can use something like Fluentd or logspout to pipe your logs to say an ELK or an EFK stack.

like image 127
Rico Avatar answered Oct 04 '22 13:10

Rico