I would like to create a .ps1 script that would open an Windows Terminal window with multiple tabs and in each tab a command to be executed ( kubectl logs -f "name_of_pod" ).
So I would basically want to automate my day to day process of opening Windows Terminal, getting a desired pod name with 'kubectl get pods -n 'your_namespace' command and then copy the pod name and open another Windows Terminal tab and execute kubectl logs -f 'name_of_pod' there. And I've got around 10 pods whose logs I need to monitor. And if Windows Terminal crash ( it happens ) I need to start again all.
So far I've managed to only open a new Windows Terminal tab and rename the tab via .ps1 script, but I can't pass the kubectl command - I am getting error "[error 2147942593 (0x800700c1) when launching.. "
Does anyone have any ides how to do this?
All best, D.