kubectl icon indicating copy to clipboard operation
kubectl copied to clipboard

weird behaviour of kubectl debug set-image under ohmyzsh

Open warjiang opened this issue 1 year ago • 3 comments

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.

warjiang avatar Mar 06 '24 06:03 warjiang

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 06 '24 06:03 k8s-ci-robot

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

ah8ad3 avatar Mar 06 '24 12:03 ah8ad3

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.

warjiang avatar Mar 06 '24 13:03 warjiang

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

/close

eddiezane avatar Mar 27 '24 16:03 eddiezane

@eddiezane: Closing this issue.

In response to this:

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 27 '24 16:03 k8s-ci-robot