From 8859c6ff6d3e5c921a2bbc84ce561c2c5eb0c973 Mon Sep 17 00:00:00 2001 From: oneoneonepig Date: Wed, 5 Feb 2020 20:41:00 +0800 Subject: [PATCH] Update README.md --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2351ecb..aaccd3b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,28 @@ # pod-restarter -Restarts a specific Pod in Kubernetes +Restarts some Pods in Kubernetes, selected by labels + +## Usage +``` +-grace-period int + the duration in seconds before the object should be deleted. (default 30) +-namespace string + specify the namespace of the pods (default "default") +-selector string + label selector +``` + +## Example +Delete all Pods in default Namespace +``` +pod-restarter -namespace=default +``` +Delete all Pods with label "app=nginx" in default Namespace +``` +pod-restarter -namespace=default -selector="app=nginx" +``` + +## Library and reference +- https://github.com/kubernetes/client-go +- https://github.com/kubernetes/client-go/blob/master/examples/out-of-cluster-client-configuration/main.go +- https://github.com/kubernetes/client-go/blob/master/examples/in-cluster-client-configuration/main.go +