I am trying to run kubectl logs command for on-going logs for a pod. Since the logs for this pod are huge, we are interested in only collecting these logs for first 60 seconds. The way I am achieving is by using –request timeout option as below:
kubectl -n vdu logs deployment/pod-name -c pod-name -f –request-timeout=”60s”
We are able to collect the logs for 60s, but we get an Exit code 1 upon its completion, which is a problem for us. I am wondering if there is any other way to achieve this with Exit code 0?
Thanks very much!!
Read more here: Source link