Need help with knsk?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

208 Stars 44 Forks MIT License 77 Commits 5 Opened issues


This tool is aimed to kill namespaces that stuck in Terminating mode after you try to delete it.

Services available


Need anything else?

Contributors list

knsk - Kubernetes namespace killer

This script is aimed to kill namespaces that are stuck in Terminating mode after you try to delete them. Just calling this script without flags, it shows you the possible problems that put your namespace in forever terminating mode.

It automates the tips by in

If it doesn't work for you, please, let me know. It is hard to force namespace in Terminating mode just to test it.

Do you want a backup first?

Just call the script to make a backup of all cluster in YAML format, ordered by folder:

 curl -s | bash 
 wget -q -O - | bash 

Basic usage

 curl -s | bash 
 wget -q -O - | bash 

In this mode, this script only shows the possible causes that put your namespaces in Terminating mode. If you want this script to try to fix the mess, clone this repository, set the execution bit to the
script and look at advanced options by typing
./ --help

Just to see what are the possible commands to solve the problem by yourself, use the dry-run mode like

 ./ --dry-run --delete-all --force

Options [options]

--dry-run Show what will be executed instead of execute it (use with '--delete-*' options) --skip-tls Set --insecure-skip-tls-verify on kubectl call --delete-api Delete broken API found in your Kubernetes cluster --delete-resource Delete resources found in your stuck namespaces --delete-all Delete resources of stuck namespaces and broken API --force Force deletion of stuck namespaces even if a clean deletion fail --port {number} Up kubectl proxy on this port, default is 8765 --timeout {number} Max time (in seconds) to wait for Kubectl commands --no-color All output without colors (useful for scripts) -h --help Show this help

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.