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

Added a kubectl cheatsheet. #15674

Merged
merged 1 commit into from
Nov 23, 2015
Merged

Conversation

erictune
Copy link
Member

No description provided.

@erictune
Copy link
Member Author

Cheatsheet with good jsonpath examples.
Saw a fair number of questions on slack today about templates, so I think the need for something is there. Feedback welcome.

@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 14, 2015
@k8s-bot
Copy link

k8s-bot commented Oct 14, 2015

GCE e2e test build/test passed for commit 1c8f88e9eb393bbfe86b2e17be9fc25d2762d9d0.

@bgrant0607
Copy link
Member

$ 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: deleting

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@bgrant0607
Copy link
Member

Cool

@bgrant0607 bgrant0607 added kind/documentation Categorizes issue or PR as related to documentation. area/kubectl e2e-not-required labels Oct 15, 2015
@bgrant0607
Copy link
Member

Maybe @kelseyhightower has suggestions

@bgrant0607
Copy link
Member

@erictune erictune changed the title WIP: Added a kubectl cheatsheet. Added a kubectl cheatsheet. Oct 19, 2015
@erictune
Copy link
Member Author

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.
Copy link
Member

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.

@k8s-bot
Copy link

k8s-bot commented Oct 19, 2015

GCE e2e build/test failed for commit 1b742ffae9f855f70ea4bb3dc362a0817d089f37.

@bgrant0607
Copy link
Member

I like the cheatsheet. #15032

Would like to see common scenarios addressed

@k8s-bot
Copy link

k8s-bot commented Nov 13, 2015

GCE e2e test build/test passed for commit 0dd684e.

@brendandburns
Copy link
Contributor

This has been waiting long enough, I'm LGTM-ing and we can iterate.

@brendandburns brendandburns added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 23, 2015
@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Nov 23, 2015
Auto commit by PR queue bot
@k8s-github-robot k8s-github-robot merged commit c52e45c into kubernetes:master Nov 23, 2015
@krousey
Copy link
Contributor

krousey commented Nov 23, 2015

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

@krousey
Copy link
Contributor

krousey commented Nov 23, 2015

@ixdy @ihmccreery Shouldn't there be a PR check to catch this?

erictune added a commit to erictune/kubernetes that referenced this pull request Dec 1, 2015
gmarek added a commit that referenced this pull request Dec 3, 2015
RichieEscarez pushed a commit to RichieEscarez/kubernetes that referenced this pull request Dec 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubectl kind/documentation Categorizes issue or PR as related to documentation. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants