From 5af7979b2ce88abc194806c8b78b37458d1eb0a5 Mon Sep 17 00:00:00 2001 From: Sean Knox Date: Wed, 22 Aug 2018 21:40:02 -0700 Subject: [PATCH] add instructions for running --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 72f1506..14685da 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,32 @@ +# Running in a Kubernetes cluster without RBAC enabled + +Just run the pod by itself: + +``` +$ kubectl run --rm -i -t kube-resource-checker --image=seanknox/kube-resources-checker:latest --restart=Never +``` + +# Running in a Kubernetes cluster with RBAC enabled +1. Create the service account and cluster role binding: + +``` +$ kubectl apply -f https://raw.githubusercontent.com/Azure/kube-resources-checker/master/sa.yaml?token=ABLLDrNcuHMro9jQ0xduCaEbpzLupzQUks5bh3RhwA%3D%3D +``` + +2. Run the pod: + +``` +$ kubectl run --rm -i -t kube-resource-checker --image=seanknox/kube-resources-checker:latest --restart=Never --overrides="{ \"apiVersion\": \"v1\", \"spec\": { \"serviceAccountName\": \"kube-resource-checker\" } }" +``` + +3. If desired, delete the service account and cluster role binding: + +``` +$ kubectl delete -f https://raw.githubusercontent.com/Azure/kube-resources-checker/master/sa.yaml?token=ABLLDrNcuHMro9jQ0xduCaEbpzLupzQUks5bh3RhwA%3D%3D +``` + + # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a