vscode-kubernetes-tools / vscode-kubernetes-tools

Kubernetes extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools
Apache License 2.0
699 stars 251 forks source link

problem on showing log of init container #1373

Closed lcasavola closed 3 days ago

lcasavola commented 1 month ago

Hello, with v.1.3.18 when i try to get log from a init container i got the following error ( more evident by using the Termina destination) kubectl logs pod/omnis11v2-684f969958-45wp6 --namespace=omnis-bas-001 --container=logshipper (init) -f --since=0 bash: syntax error near unexpected token `(' I think the problem is due to the fact that the container list box present the suffix "(init)" for the init container and that suffix is not excluded when you generate thecontainer name on kubectl log command. IN the previous version the log for init container worked correctly. Rgds Luca

hime commented 3 weeks ago

Having the same issue.

Error reading logs: Kubectl command failed: /bin/sh: -c: line 1: syntax error near unexpected token(' /bin/sh: -c: line 1: kubectl logs pod/one-ephemeral-vol --namespace=default --container=my-container (init) --since=0'

bcmyguest commented 2 weeks ago

@Tatsinnit feel free to change my PR, I can be slow to reply on this account