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 +