Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Able to display specific container log in a pod #1187

Closed
mts-dyt opened this issue Aug 11, 2023 · 4 comments
Closed

Able to display specific container log in a pod #1187

mts-dyt opened this issue Aug 11, 2023 · 4 comments
Labels

Comments

@mts-dyt
Copy link

mts-dyt commented Aug 11, 2023

Overview

Select the container when executing kubectl logs <pod>

Acceptance Criteria

  • kubebot command allows to select a specific container to display logs

Reason

When we have multiple containers in a pod, it is always displayed the logs of the first container

@mts-dyt mts-dyt added the enhancement New feature or request label Aug 11, 2023
@josefkarasek
Copy link

Hey @mts-dyt, have you tried to specify which container you want the logs from?

$ kubectl logs -h
...
    -c, --container='':
	Print the logs of this container

Example:

kubectl logs -n kube-system -c lb-tcp-80   svclb-traefik-e82aa45a-qq7hp on test-cluster

+ trap exit TERM INT
+ echo 10.43.211.164
+ grep -Eq :
+ cat /proc/sys/net/ipv4/ip_forward
+ '[' 1 '!=' 1 ]
+ iptables -t nat -I PREROUTING '!' -s 10.43.211.164/32 -p TCP --dport 80 -j DNAT --to 10.43.211.164:80
+ iptables -t nat -I POSTROUTING -d 10.43.211.164/32 -p TCP -j MASQUERADE
+ '[' '!' -e /pause ]
+ mkfifo /pause

@pkosiec pkosiec added question and removed enhancement New feature or request labels Sep 7, 2023
@pkosiec
Copy link
Collaborator

pkosiec commented Sep 7, 2023

Hey @mts-dyt,
I'm closing this issue as resolved. Feel free to reopen the issue if your problem is not resolved 🙂 Ensure you use the latest Botkube version. Cheers!

@pkosiec pkosiec closed this as completed Sep 7, 2023
@mts-dyt
Copy link
Author

mts-dyt commented Sep 7, 2023

hi @pkosiec
Yes the command is OK but the idea was to able to select the container from slack

@pkosiec
Copy link
Collaborator

pkosiec commented Sep 7, 2023

Hey @mts-dyt,
Ah, you mean the interactive dropdown? If so, we have such issue already: #949. Please follow it for updates. For now this is not planned to any of the upcoming milestones, but that might change soon. Please add a reaction under #949 so that we can see the popularity of the feature request. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants