Posts

How to delete Kubernetes namespace stuck in terminating state

How to delete Kubernetes namespace stuck in terminating state: Port forwarding to k8s: ssh -oTCPKeepAlive=no -oServerAliveInterval=20 -J<name of vm>:2222 -NL 4443:<IP Address of k8s>:4443 <user_id>@bastion.local Open another terminal and run below command: kubectl api-versions kubectl get namespaces NAME              STATUS AGE admin             Active 213d buglabs           Terminating 6d20h default           Active 265d kube-node-lease   Active 265d kube-public       Active 265d kube-system       Active 265d tslogs            Terminating 186d kubectl get namespace <namespace> -o json > <namespace>.json kubectl get namespace buglabs -o json > buglabs.json Edit buglabs.json file and remove ...