-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
Added a kubectl cheatsheet. #15674
Added a kubectl cheatsheet. #15674
Conversation
Cheatsheet with good jsonpath examples. |
Labelling this PR as size/L |
GCE e2e test build/test passed for commit 1c8f88e9eb393bbfe86b2e17be9fc25d2762d9d0. |
See also https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/kubectl-overview.md cc @kubernetes/kubectl |
$ kubectl get nodes -o jsonpath='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'| tr ';' "\n" | grep "Ready=True" | ||
``` | ||
|
||
## Modifying and Deleteing Resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: deleting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Cool |
Maybe @kelseyhightower has suggestions |
Demo of Kelsey removing a label in order to orphan a pod for debugging: |
I saw kubectl-overview.md. I thought there was a need for some complex examples of command line, especially with jsonpath templates. Would people rather see the jsonpath examples taken out of this doc and merged into kubectl-overview.md? |
$ kubectl label pods <pod-name> new-label=awesome # Add a Label | ||
$ kubectl annotate pods <pod-name> icon-url=http://goo.gl/XXBTWq # Add an annotation | ||
|
||
# TODO: examples of kubectl edit, patch, delete, replace, scale, and rolling-update commands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need example of "apply" too.
GCE e2e build/test failed for commit 1b742ffae9f855f70ea4bb3dc362a0817d089f37. |
I like the cheatsheet. #15032 Would like to see common scenarios addressed |
GCE e2e test build/test passed for commit 0dd684e. |
This has been waiting long enough, I'm LGTM-ing and we can iterate. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
I think this broke kubernetes-test-go. 10:45:51 Verifying ./hack/../hack/verify-generated-docs.sh
10:45:52 +++ [1123 18:45:52] Building go targets for linux/amd64:
10:45:52 cmd/gendocs
10:45:52 cmd/genkubedocs
10:45:52 cmd/genman
10:45:52 cmd/genbashcomp
10:45:52 cmd/mungedocs
10:46:07 +++ [1123 18:46:07] Placing binaries
10:46:09 /workspace/kubernetes/docs/user-guide/kubectl-cheatsheet.md
10:46:09 ----
10:46:09 unversioned-warning:
10:46:09 contents were modified
10:46:09
10:46:09 FAIL: changes needed but not made due to --verify
10:46:09 /workspace/kubernetes/docs/ is out of date. Please run hack/update-generated-docs.sh
10:46:09
!!! Error in ./hack/../hack/verify-generated-docs.sh:28
10:46:09 '"${KUBE_ROOT}/hack/after-build/verify-generated-docs.sh" "$@"' exited with status 1
10:46:09 Call stack:
10:46:09 1: ./hack/../hack/verify-generated-docs.sh:28 main(...)
10:46:09 Exiting with status 1
10:46:09 FAILED |
@ixdy @ihmccreery Shouldn't there be a PR check to catch this? |
No description provided.