Skip to content

jenoOvchi/k8sdelns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

k8sdelns

Tool for force deletion of Kubernetes namespaces

Description

If your Kubernetes cluster namespace stuck in the "Terminating" state you can use this tool for its fast forced deletion

Prerequisites

$ k create ns test
namespace/test created
$ kubectl delete ns test
namespace "test" deleted
$ kubectl get ns
NAME                  STATUS        AGE
default               Active        66d
kube-node-lease       Active        66d
kube-public           Active        66d
kube-system           Active        66d
kubectl-debug-agent   Active        23h
test                  Terminating   43s

Installation

curl -Lo k8sdelns-v1.1.tar.gz https://github.com/jenoOvchi/k8sdelns/archive/v1.1.tar.gz
  • Extract k8sdelns sources
tar -zxvf k8sdelns-v1.1.tar.gz
  • Add execution permission to k8sdelns script
cd k8sdelns-1.1/
chmod +x k8sdelns
  • Move k8sdelns script to /usr/local/bin/
sudo mv k8sdelns /usr/local/bin/
  • Delete k8sdelns sources
cd ..
rm -rf k8sdelns-v1.1/
rm v1.0.tar.gz

Usage

Execute k8sdelns script with your namespace name (for example "test"):

k8sdelns test

About

Tool for force deletion of Kubernetes namespaces

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages