From 43564451b7bc0879138af856b3cc1aabefa041b5 Mon Sep 17 00:00:00 2001 From: Gustav Westling Date: Thu, 30 Jan 2020 21:33:23 +0100 Subject: [PATCH] Document how to run kube-score against an existing Kubernetes cluster Not using 'kubectl get all', as it doesn't include all types of objects that kube-score might support in the future --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f3ecff23..fa7aa904 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ You can test kube-score out in the browser with the [online demo](https://kube-s Pre-built releases can be downloaded from the [GitHub releases](https://github.com/zegl/kube-score/releases), from [Docker Hub](https://hub.docker.com/r/zegl/kube-score/), or with homebrew: -```bash +```bash brew install kube-score/tap/kube-score ``` @@ -59,6 +59,14 @@ kube-score score my-app/*.yaml kube-score score my-app/deployment.yaml my-app/service.yaml ``` +### Example with an existing cluster + +```bash +kubectl api-resources --verbs=list --namespaced -o name \ + | xargs -n1 -I{} bash -c "kubectl get {} --all-namespaces -oyaml && echo ---" \ + | kube-score score - +``` + ## Configuration ```