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

Example correction in the documentation: "kubectl auth can-i ... --as ..." #45728

Closed
czavieh opened this issue Mar 30, 2024 · 9 comments
Closed
Labels
language/en Issues or PRs related to English language needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@czavieh
Copy link

czavieh commented Mar 30, 2024

documentation at this URL
https://kubernetes.io/docs/reference/kubectl/generated/kubectl_auth/kubectl_auth_can-i/#examples

The following example need to be corrected
from:
kubectl auth can-i list pods --as=system:serviceaccount:dev:foo -n prod
to:
kubectl auth can-i list pods --as="system:serviceaccount:dev:foo" -n prod
or
kubectl auth can-i list pods --as system:serviceaccount:dev:foo -n prod

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 30, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, 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.

@stmcginnis
Copy link
Contributor

The existing format should work the same as the alternates. Can you share what problem you are seeing with it?

@dipesh-rawat
Copy link
Member

/language en

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Mar 30, 2024
@dipesh-rawat
Copy link
Member

dipesh-rawat commented Mar 30, 2024

/triage needs-information

@czavieh Would you be able to share the information requested in #45728 (comment)

@k8s-ci-robot k8s-ci-robot added the triage/needs-information Indicates an issue needs more information in order to work on it. label Mar 30, 2024
@sftim
Copy link
Contributor

sftim commented Apr 1, 2024

/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Apr 1, 2024
@czavieh
Copy link
Author

czavieh commented Apr 4, 2024

I tried to use the format as suggested in the documentation, --as=system:serviceaccount:dev:foo cli didn't accept it. However when I put the value in the double quotation marks, cli accepted:
--as="system:serviceaccount:dev:foo"
I didn't have any issue with this format(not using =) : --as system:serviceaccount:dev:foo

So I am confused too. This happened the day I reported. I delete that environment and don't have access to it to take screenshot. I don't have any explanation and if I am the only person who has ever reported this, we can close the ticket and next time I encounter this issue, I will document it with details and then report it. Thank you for prompt response.

@niranjandarshann
Copy link
Contributor

@czavieh The command is working perfectly the same as given in the doc and the suggested one. --as=system:serviceaccount:dev:foo is not an intentional behaviour you can use either of the command in some case the command in "" will be treated as single argument which is correct and intended behaviour.

So both the command are working fine and are correct.

@niranjandarshann
Copy link
Contributor

So for now i am closing this issue you can reopen it or raise the new issue in case you encounter the error.

/close

@k8s-ci-robot
Copy link
Contributor

@niranjandarshann: Closing this issue.

In response to this:

So for now i am closing this issue you can reopen it or raise the new issue in case you encounter the error.

/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language/en Issues or PRs related to English language needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

6 participants