From the course: Debugging Kubernetes
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Removing finalizers from namespaces - Kubernetes Tutorial
From the course: Debugging Kubernetes
Removing finalizers from namespaces
- [Instructor] Now, the approach we've seen for deleting finalizers works for almost every resource, except namespaces. Deleting namespace finalizers is slightly more complicated. Let's see what I mean here. Run kubectl get ns to see the namespaces in our folder. You'll see a namespace called delete-me, which is very suggestive. I think we should just delete it, so let's go ahead and delete it. You'll now see that that namespace is stuck in a deleting state. However, just like our pesky pod, this namespace is stuck also. Now, given that we just scanned the API resources in our cluster and confirmed that nothing else is waiting on this namespace, we could try to remove it by running kubectl init ns delete-me. Find the finalizer, remove it, save and quit. You can see that nothing's changed and our namespace is still waiting to be deleted over here. The only way to remove the finalizer from a namespace is to use the Kubernetes API directly. To do that, we'll need to obtain five pieces of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Quick refresher on kubeconfig files3m 37s
-
(Locked)
Why Kubernetes authentication issues occur2m 2s
-
(Locked)
Retrieving data from kubeconfig contexts7m 48s
-
(Locked)
Retrieving user certificates from kubeconfig files6m
-
(Locked)
Confirming kubeconfig certificate validity2m 32s
-
(Locked)
Generating new Kubernetes user certificates9m 10s
-
(Locked)
Understanding slow kubectl commands4m 24s
-
(Locked)
Understanding NotReady Kubernetes nodes1m 5s
-
(Locked)
Identifying kubelets that are not started5m 33s
-
(Locked)
Restarting the kubelet service4m 7s
-
(Locked)
Troubleshooting missing CNIs5m 1s
-
(Locked)
Understanding slow Kubernetes resource deletions1m 33s
-
(Locked)
Identifying Kubernetes resource finalizers4m 26s
-
(Locked)
Safely removing Kubernetes resource finalizers3m 47s
-
(Locked)
Removing finalizers from namespaces6m 57s
-
(Locked)
-