felixfbecker / PSKubectl

kubectl with the power of the object pipeline
MIT License
61 stars 9 forks source link

Question: kubectl describe pod equivilant #64

Open BlythMeister opened 4 years ago

BlythMeister commented 4 years ago

Is it possible to run kubectl describe pod [podName] to get events for a specific pod?

felixfbecker commented 4 years ago

So kubectl describe and kubectl get are the same in PSKubectl (Get-KubeResource), because describe is mostly just a more detailed version of get, and in PSKubectl all data is always returned and can be formatted freely.

Events are not returned by Get-KubeResource though, but they can be queried directly:

Get-KubeResource event | where name -match 'podName'

or

Get-KubeResource event | where { $_.InvolvedObject.Name -eq 'podName' }

Does that work?

BlythMeister commented 4 years ago

Ahh yes, that works :)