A flower, by any other name ...

A project log for Project Dandelion

Easy 64bit Ubuntu 20.04 microk8s on Raspberry Pi 4

CarbonCycleCarbonCycle 11/27/2020 at 05:550 Comments


                                    About namespaces and namespace use

I wanna give some unsolicited advice.
Don't use the default namespace. Just don't.
There are reasons.

Namespaces are fundamental to how kubernetes is designed and the implied behaviour of the objects used in kubernetes. The term default will not serve you in the context (pun intended) of designing kubernetes clusters.

There are two basic types of object states in this regard - namespaced and Non-namespaced.  The implied design is that objects in the default namespace - are NOT namespaced.  This has many implications to security and other unpleasant topics.

A good motivation for using namespaces is that you can clean up failed complex deployments easily by just deleting the namespace used for that deployment. This allows rapid iteration after the usual typo is found and corrected.

So there. I said it.  Learn how to use namespaces and never, ever use the default.

It is possible to overuse namespaces.  Again, there are implications.  For each namespace created, there is duplication of objects for etcd.  Remember - the essential concept is that you get a virtual, standalone cluster in that namespace.  And that has consequences that should be considered in kubernetes architecture design and deployment.