Status Terminanting in Namespace

Hello team, a question i have been deleting a Namespace in Kubernetes and it was stuck in state: Terminanting (no matter how much I put --force on it), how can I restart the Kubernetes Cluster to see if this state is released. Thanks.


Hi @maktup 

This is  very serious  problem  , indeed  if  you  have  a namespace  ,
 in 'terminating' state, You will have to  use the  script
  "Kubernetes NameSpace Killer" : (knsk)

git clone https://github.com/thyarles/knsk/

cd knsk

ls -l knsk

-rwxr-xr-x 1 root root 13185 Aug 13 18:14 knsk.sh

start the script:
-------------------
$  ./knsk.sh

Kubernetes NameSpace Killer

Checking if kubectl is configured... ok

Checking for unavailable apiservices... not found

Checking for stuck namespaces... not found

Checking for stuck resources in the cluster...
 not found

Checking for orphan resources in the cluster... not found

:: Done in 41 seconds.

Good Luck !

1 Like

Hi @samer thanks for your answer. Please this Script in which part i can specificate the Namespace with the problema. Beacause i can not impact to others.

thanks you.


Hi @maktup

You don't need to specify the namespace, the script will 
Only delete the "Terminating" namespace, with no impact to the others. 

This script delete 'Kubernetes' namespaces that stuck in "Terminanting status"
No worry about the others  namespaces   ...  If  you wanted to make sure 
this  script is  doing what it's  expected to do , contact  the person who wrote 
the script  "[email protected]"
And  ask him , if  there's no impact to other namespaces.

Good Luck !