Skip to content

Instantly share code, notes, and snippets.

@prskr
Created April 26, 2022 17:33
Show Gist options
  • Select an option

  • Save prskr/f5995c19d9eb5c09992f68693ec7db41 to your computer and use it in GitHub Desktop.

Select an option

Save prskr/f5995c19d9eb5c09992f68693ec7db41 to your computer and use it in GitHub Desktop.

Revisions

  1. prskr renamed this gist Apr 26, 2022. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. prskr created this gist Apr 26, 2022.
    1 change: 1 addition & 0 deletions Delete all failed pods
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    for ns in $(k get ns -o name | sed "s#namespace/##g"); do k delete -n "$ns" $(k -n "$ns" get pod --field-selector=status.phase=Failed -o name); done