diff --git a/docs/README.md b/docs/README.md index 9210a4de2..fd5cc6916 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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) diff --git a/docs/cheatsheet.md b/docs/cheatsheet.md new file mode 100644 index 000000000..060107039 --- /dev/null +++ b/docs/cheatsheet.md @@ -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 diff --git a/docs/faq.md b/docs/faq.md index 765d552c4..189fa850b 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -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).