kubernetes namespaces
- kubernetes supports multiple virtual clusters in the same physical cluster
- namespace == virtual cluster
- can split objects in distinct groups (kubernetes label cannot)
- objects are unique inside a namespace, i.e. objects with the same name can exist in two distinct namespace
- can allocate resource quotas per namespace
- when no namespace is specified, the
default
namespace is used
- kubectx and kubens: tools to easily switch k8s clusters and namespaces
- ⚠️ namespace cannot contain a dot
.
- create an object in a namespace, add the
metadata.namespace
value:
LimitRanges
It’s possible to configure limit
per namespace
:
ResourceQuota
Limit total resource usage for a namespace
: