Re: [kubernetes/kubernetes] Kubectl can do smart things with partial names (#17144)

0 views
Skip to first unread message

Michail Kargakis

unread,
Jun 10, 2017, 12:12:24 PM6/10/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@kubernetes/sig-cli-misc


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Shiyang Wang

unread,
Jun 11, 2017, 8:22:21 PM6/11/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/assign

fejta-bot

unread,
Dec 27, 2017, 4:35:26 AM12/27/17
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

Brian Grant

unread,
Jan 22, 2018, 6:05:38 PM1/22/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/remove-lifecycle stale

Matt McKellar-Spence

unread,
Mar 5, 2018, 8:17:19 PM3/5/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

This functionality sounds great, especially getting logs using only the pod prefix.

I see it's also using the deprecated team/ux label.

Silas Hansen

unread,
May 5, 2018, 3:29:23 PM5/5/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

The way the docker cli handles this for ids is great. If more than one resource is matching the prefix, the command is not executed.

fejta-bot

unread,
Aug 3, 2018, 3:31:44 PM8/3/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Silas Hansen

unread,
Aug 4, 2018, 5:00:07 AM8/4/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

This is still a very wanted feature that @shiywang seemed to have a promising grip on. Has it been abandoned?

Ryan Kemper

unread,
Aug 4, 2018, 9:02:38 PM8/4/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Looks like it got abandoned. Really hope this feature gets added

Nikhita Raghunath

unread,
Aug 10, 2018, 10:31:24 AM8/10/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Has it been abandoned?

I'm still going to mark it as non-stale given that the feature is wanted. If someone can take this up, they would be most welcome.

/remove-lifecycle stale

Shiyang Wang

unread,
Oct 31, 2018, 2:27:36 AM10/31/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

I'm going to continue my work here to see what we can do.

Chris Nelson

unread,
Nov 9, 2018, 10:16:31 AM11/9/18
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

+1

Phillip Wittrock

unread,
Jan 2, 2019, 5:52:28 PM1/2/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

As devil's advocate - kubectl logs already supports using label selectors, and exec / attach could be updated to support this as well. Are selectors insufficient, or just not widely publicized?

Phillip Wittrock

unread,
Jan 3, 2019, 12:03:05 PM1/3/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/assign shiywang

Di Weng

unread,
Jan 6, 2019, 11:23:50 PM1/6/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

There are some shell completion plugins available to achieve the similar functionality, such as kubectl plugin for zsh provided by oh-my-zsh.

Clayton Coleman

unread,
Jan 7, 2019, 1:08:22 AM1/7/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention
Can we improve the shell completion plugins instead to cover some of these
use cases?


On Sun, Jan 6, 2019 at 11:23 PM Di Weng <notifi...@github.com> wrote:

> There are some shell completion plugins available to achieve the similar
> functionality, such as kubectl plugin
> <https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/kubectl/kubectl.plugin.zsh>

> for zsh provided by oh-my-zsh.
>
> —
> You are receiving this because you are on a team that was mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/kubernetes/kubernetes/issues/17144#issuecomment-451818075>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABG_p91ffylfGmb96baxuz_DW1ID8TwUks5vAsumgaJpZM4Ggsot>

Cosmin Lehene

unread,
Jan 26, 2019, 3:12:54 PM1/26/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Can we improve the shell completion plugins instead to cover some of these use cases?

On Sun, Jan 6, 2019 at 11:23 PM Di Weng ***@***.***> wrote: There are some shell completion plugins available to achieve the similar functionality, such as kubectl plugin https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/kubectl/kubectl.plugin.zsh for zsh provided by oh-my-zsh. — You are receiving this because you are on a team that was mentioned. Reply to this email directly, view it on GitHub <#17144 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG_p91ffylfGmb96baxuz_DW1ID8TwUks5vAsumgaJpZM4Ggsot .

Should these two be exclusive?

Andrew Holway

unread,
Feb 24, 2019, 10:21:48 AM2/24/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

+1

fejta-bot

unread,
May 25, 2019, 11:54:46 AM5/25/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Gabor Maghera

unread,
Jun 12, 2019, 10:06:50 PM6/12/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@pwittrock selectors work very well for logs, although it requires a little more typing. The only real drawback for using selectors is the inability to also use -f or --follow in the same command.

BTW, for those waiting on this to be implemented, kubetail or stern might be worth looking at in the meantime.

Alejandro Saucedo

unread,
Jun 19, 2019, 10:29:33 PM6/19/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@bprashanth @bgrant0607 @gmaghera @nikhita why wouldn't you just use kubectl autocompletion? Surely that should address 95% of the usecases by typing the name of the pod followed by . If you use zsh you can navigate through all the string matches so that should address the remaining 5%. (i.e. https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion should close thiis issue).

Eugene Glotov

unread,
Jun 28, 2019, 3:06:27 PM6/28/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@axsaucedo , because it's an extremely slow feature for big clusters.

Alejandro Saucedo

unread,
Jul 2, 2019, 3:48:59 AM7/2/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@KIVagant fair enough, that does makes sense 👍

fejta-bot

unread,
Aug 1, 2019, 4:26:34 AM8/1/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.

/lifecycle rotten

fejta-bot

unread,
Aug 31, 2019, 5:24:35 AM8/31/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.


Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Kubernetes Prow Robot

unread,
Aug 31, 2019, 5:24:47 AM8/31/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Kubernetes Prow Robot

unread,
Aug 31, 2019, 5:24:53 AM8/31/19
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

Closed #17144.

olenm

unread,
Mar 3, 2021, 4:37:46 PM3/3/21
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

/reopen
/remove-lifecycle rotten


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or unsubscribe.

Kubernetes Prow Robot

unread,
Mar 3, 2021, 4:37:54 PM3/3/21
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@olenm: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen
/remove-lifecycle rotten

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Daniel Akhterov

unread,
Oct 21, 2021, 12:11:53 AM10/21/21
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

This doesn't solve the issue, but I created this abbreviation in fish to help with this.

abbr -a kbl "kubectl logs -f (kubectl get pods | tail -n +2 | sed \"s#^\(\S\+\)\s.*\\\$#\1#\" | fzf)"


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications on the go with GitHub Mobile for iOS or Android.

olenm

unread,
Nov 29, 2021, 7:02:13 PM11/29/21
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

does shell completion solve the issue of case 3 for OP?

I'd like to see this issue re-opened - I do not entirely agree that its the shell's job to process a list of pod-names and parse it with grep/awk/sed, and then feed it to the user when an attempt for kubectl get pod nginx is used with the intent to list all pods that start with that prefix.

Marc Skov Madsen

unread,
Feb 2, 2022, 11:32:36 AM2/2/22
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

I would like this issue reopened. It would make it so much easier for "simple" datascience users on our Jupyterhub that needs a minimum of monitoring. They can do kubectl get logs and kubectl get pods. Would be so much easier for them if this feature was supported.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/17144/1028123528@github.com>

Eugene Glotov

unread,
Feb 2, 2022, 5:24:19 PM2/2/22
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

@MarcSkovMadsen , there are other tools like kubetail or stern that can help with logs. As for getting Pods, we should all just suffer.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/17144/1028415039@github.com>

Tony Li

unread,
Nov 2, 2022, 9:39:31 PM11/2/22
to kubernetes/kubernetes, k8s-mirror-cli-misc, Team mention

As devil's advocate - kubectl logs already supports using label selectors, and exec / attach could be updated to support this as well. Are selectors insufficient, or just not widely publicized?

If only selecting by labels -l was available to kubectl edit


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are on a team that was mentioned.Message ID: <kubernetes/kubernetes/issues/17144/1301552265@github.com>

Reply all
Reply to author
Forward
0 new messages