<p>When I call kubectl logs pod_name, I get both the stdout/err combined. Is it possible to specify that I only want stdout or stderr? Likewise I am wondering if it is possible to do so through the k8s rest interface. I've searched for several hours and read through the repository but could not find anything.</p>

<p>Thanks!</p>

<p>No, this is not possible. To my knowlegde, the moment of writing this, kubernetes supports only one <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#read-log-pod-v1-core" rel="nofollow noreferrer">logs api endpoint</a> that returns all logs (stdout and stderr combined).</p>

<p>If you want to access them separately you should consider using different <a href="https://docs.docker.com/config/containers/logging/configure/" rel="nofollow noreferrer">logging driver</a> or query logs directly from docker.</p>
