-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d927de
commit 8859c6f
Showing
1 changed file
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|