kubernetes / kubectl

Issue tracker and mirror of kubectl code
Apache License 2.0
2.75k stars 894 forks source link

weird behaviour of kubectl debug set-image under ohmyzsh #1569

Closed warjiang closed 3 months ago

warjiang commented 3 months ago

What would you like to be added: image change the example of set-image option

kubectl debug mypod --copy-to=my-debugger --set-image="*=busybox"
kubectl debug mypod -it --copy-to=my-debugger --image=debian --set-image="app=app:debug,sidecar=sidecar:debug"

Why is this needed:

when i follow the examples in kubectl debug -h, when i try to set-image for debug containers, a mistake occured like following: image

and i found a releated issue of ohmyzsh: https://github.com/ohmyzsh/ohmyzsh/issues/31 after add double quote, it worked as expecte. image

so i suggest that correct the example.

k8s-ci-robot commented 3 months ago

This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
ah8ad3 commented 3 months ago

This issue is not a kubectl issue, many commands have the same issue when using ohmyzsh, did you consider this comment? https://github.com/ohmyzsh/ohmyzsh/issues/31#issuecomment-359728582

unsetopt nomatch

warjiang commented 3 months ago

This issue is not a kubectl issue, many commands have the same issue when using ohmyzsh, did you consider this comment? ohmyzsh/ohmyzsh#31 (comment)

unsetopt nomatch

yeah, maybe the maintainer of kubectl can update the example, this will be useful for people who not very familiar with kubectl. When i first use kubectl debug command, it make me confused.

eddiezane commented 3 months ago

Going to close the issue but we would accept a PR if you want to make one and tag me.

/close

k8s-ci-robot commented 3 months ago

@eddiezane: Closing this issue.

In response to [this](https://github.com/kubernetes/kubectl/issues/1569#issuecomment-2023195722): >Going to close the issue but we would accept a PR if you want to make one and tag me. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.