<p>I have an azuredevops build job to get the log of a deployment pod.</p>

<p>command:  <code>kubectl logs deployment/myapp</code></p>

<p>I am getting the output in the summary page of azure devops pipeline, but the same I want to send a team with a log as an attachment. I am not getting any option in azure devops for that</p>

vyshakh
<p>Basically, your k8s log (pods) will gone after the pods has been terminated (although you can somehow keep it for a little while). For debug purpose or any other purpose you want, you need to <code>Centralized logging</code> your k8s log (use some tools: filebeat, fluentd, fluent-bit to forward your k8s log to elasticsearch).</p>

<p>EX: Some software (tools) for <code>Centralized logging</code> Elasticsearch, Graylog, ...</p>

<p><a href="https://www.elastic.co/fr/what-is/elk-stack" rel="nofollow noreferrer">https://www.elastic.co/fr/what-is/elk-stack</a></p>

<p>And then you can save, export, analyze your log ... You can do anythings you want with your stored k8s log.</p>

<p>Hope this may help you, guy!</p>

<p>Edit: I use GCP as cloud solution and in GCP, by default, they will use fluentd to forward your k8s log to store in <code>Logging</code>. And the <code>Logging</code> has feature <code>Export</code>, I think you can search somethings similar to <code>Logging</code> in your cloud solution: Azure</p>
