Skip to content

Commit

Permalink
add cheatsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
cppforlife committed Aug 15, 2019
1 parent 46081ca commit dc3d7f2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [State namespace](state-namespace.md)
- [Gitops](gitops.md)
- [Config](config.md)
- [Cheatsheet](cheatsheet.md)
- [FAQ](faq.md)
- Blog posts
- [Introducing k14s (Kubernetes Tools): Simple and Composable Tools for Application Deployment](https://content.pivotal.io/blog/introducing-k14s-kubernetes-tools-simple-and-composable-tools-for-application-deployment)
Expand Down
28 changes: 28 additions & 0 deletions docs/cheatsheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Cheatsheet

- `kapp deploy -a app1 -f config/ -c`
- Deploy app named `app1` with configuration from `config/`

- `ytt -f config/ | kapp deploy -a app1 -f- -c -y`
- Deploy app named `app1` with configuration piped in

- `kapp deploy -a app1 -f config/ -c --diff-context=10`
- Show more diff context when reviewing changes during deploy

- `kapp deploy -a app1 -f config/ --diff-run`
- Show diff and exit successfully (without applying any changes)

- `kapp deploy -a app1 -f config/ --logs-all`
- Show logs from all app `Pods` throughout deploy

- `kapp deploy -a app1 -f config/ --into-ns app1-ns`
- Rewrite all resources to specify `app1-ns` namespace

- `kapp inspect -a 'label:'`
- Show all resources in the cluster

- `kapp inspect -a 'label:tier=web'`
- Show all resources labeled `tier=web` in the cluster

- `kapp inspect -a 'label:!kapp.k14s.io/app' --filter-kind Deployment`
- Show all `Deployment` resources in the cluster **not** managed by kapp
5 changes: 5 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ Some fields on a resource are immutable. kapp provides a `kapp.k14s.io/update-st
[via slack](https://kubernetes.slack.com/archives/CH8KCCKA5/p1565624685226400)

kapp has a feature called [versioned resources](https://github.com/k14s/kapp/blob/master/docs/diff.md#versioned-resources) that allows kapp to create uniquely named resources instead of updating resources with changes. Resources referencing versioned resources are forced to be updated with new names, and therefore are changed, thus solving a problem of how to propagate changes safely.

---
### Quick way to find common kapp command variations

See [cheatsheet](cheatsheet.md).

0 comments on commit dc3d7f2

Please sign in to comment.