Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 937 Bytes

README.md

File metadata and controls

30 lines (26 loc) · 937 Bytes

pod-restarter

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

TODO

  • Check if the Pod is created by a controller. If yes, check delete the pod, if no, check whether the flag "-ignore-naked-pods" is set.