Access Control

Lock Down APIs with Role-Based Access Control

Clean Up

Time to clean up your Kubernetes environment to keep it tidy for future lessons.

Delete All Namespaces

If you're following along with Docker Desktop Kubernetes (local development), run:

kubectl delete namespace --all

Note: Default namespaces like kube-system, kube-node-lease, etc. will be deleted momentarily but automatically recreate themselves.

⚠️ Important Warning

DO NOT run these commands if you're working in:

  • A shared/sandbox cluster
  • A production cluster
  • Any cluster with important workloads

These commands will delete entire namespaces and all resources within them. Only use on your local development cluster.

Verify Clean State

Check that the namespaces are gone:

kubectl get namespaces

Your cluster is now clean and ready for the next lesson!

🎉 Course Complete!