<p>I'm on a Windows 10 and using WSL.</p>
<p>I have 8 pods inside my namespace:</p>
<pre><code>NAME                   READY   STATUS    RESTARTS   AGE
app-85b6fd4dc9-4chnq   1/1     Running   0          17m
app-85b6fd4dc9-9c5dc   1/1     Running   0          19m
app-85b6fd4dc9-cth6d   1/1     Running   0          19m
app-85b6fd4dc9-m8pc8   1/1     Running   0          19m
app-85b6fd4dc9-mrsnv   1/1     Running   0          18m
app-85b6fd4dc9-qtdtl   1/1     Running   0          17m
app-85b6fd4dc9-xzmdx   1/1     Running   0          17m
app-85b6fd4dc9-zbft7   1/1     Running   0          19m
</code></pre>
<p>And I really need to see the logs with haste. My current pattern is:</p>
<pre><code>kubectl get pods -n my_namespace
[copy NAME of the pod]
kubectl logs --follow pod_name -n my_namespace
# live tail logs here
</code></pre>
<p>I want to skip the display of all pods, instead, I want to go straight to the first one available or first one on the list, whichevers applicable. Thanks for answering my noob question</p>

<p>You can try below in PowerShell, tested in PowerShell window 10 bases on output provided in the question.</p>
<pre><code>
 $var = (kubectl get pods -n my_namespace  | Select -First 2 | Select -Last 1 | %{ (-split $_)[0]) ; kubectl logs --follow $var -n my_namespace

</code></pre>
<p>I did not verify it against <code>kubectl</code> but it should work or You can check further details at <a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/select-string?view=powershell-7" rel="nofollow noreferrer">microsoft.powershell.utility</a></p>
<p>Equelevent command using AWK</p>
<pre><code>export pod=$(kubectl get pods -n namespace | awk 'FNR==2{print $1}' ) | kubectl logs -f $pod -n mypod
</code></pre>
