<p>I am trying to query a specific container's logs within a pod of several containers:</p>
<pre><code>curl --cacert ${CACERT} --header &quot;Authorization: Bearer ${TOKEN}&quot; -X GET ${APISERVER}/api/v1/namespaces/demo/pods/mypod-fgsardg4-dfsdf/log
</code></pre>
<p>How do I specify a particular container within this pod? I see that is part of the query via: <a href="https://kubernetes.io/docs/reference/kubernetes-api/workloads-resources/pod-v1/" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/kubernetes-api/workloads-resources/pod-v1/</a></p>
<p>But am not sure what it means by &quot;in query&quot;.</p>
<p>This type of request fails:</p>
<pre><code>curl --cacert ${CACERT} --header &quot;Authorization: Bearer ${TOKEN}&quot; -X GET ${APISERVER}/api/v1/namespaces/demo/pods/mypod-fgsardg4-dfsdf/containername/log
</code></pre>

ddisec
<p>Figured it out:</p>
<pre><code>GET /api/v1/namespaces/{namespace}/pods/{name}/log?container=test
</code></pre>
<p>Just didn't quite have the API syntax all the way there.</p>
